An open API service indexing awesome lists of open source software.

https://github.com/dimesoftware/services

👔 Contracts for the service layer of any project.
https://github.com/dimesoftware/services

csharp dotnet service-layer service-locator

Last synced: 26 days ago
JSON representation

👔 Contracts for the service layer of any project.

Awesome Lists containing this project

README

          

Logo





Services


## Introduction

Contracts for the service layer of any project.

## Getting Started

- You must have Visual Studio 2022 Community or higher.
- The dotnet cli is also highly recommended.

## About this project

The most notable types in this assembly include:

- `IQueryService`: matches the R in CRUD operators
- `ICommandService`: matches the CUD in CRUD operations
- `IService`: Defines the capabilities of both `IQueryService` and `ICommandService`
- `IServiceLocator`: Defines how to instantiate service class instances

## Build and Test

- Run dotnet restore
- Run dotnet build
- Run dotnet test

## Installation

Use the package manager NuGet to install Dime.System:

`dotnet add package Dime.Services`

## Usage

``` csharp
using Dime;

public class CustomerService : ICustomerService
{
public async Task> GetAllAsync()
{
IEnumerable customers = await this.Context.Customers.ToListAsync();
return customers.Select(x => this.Mapper.Map(x));
}
}
```

## Contributing

![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg?style=flat-square)

Pull requests are welcome. Please check out the contribution and code of conduct guidelines.

## License

[![License](http://img.shields.io/:license-mit-blue.svg?style=flat-square)](http://badges.mit-license.org)