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

https://github.com/quinntynebrown/mediatrandrecordtypes

An example of how you can combine MediatR and Record types to build an api in the CQRS pattern with relatively minimal code.
https://github.com/quinntynebrown/mediatrandrecordtypes

aspnetcore csharp9 entity-framework-core intergration-test mediatr netcore5 respawn value-objects

Last synced: 2 months ago
JSON representation

An example of how you can combine MediatR and Record types to build an api in the CQRS pattern with relatively minimal code.

Awesome Lists containing this project

README

        

# MediatR and Record Types

An example of how you can combine MediatR and Record types to build an api in the CQRS pattern with relatively minimal code.

## Give a Star! :star:

If you like or are using this project to learn or start your solution, please give it a star. Thanks!

## How to run locally

1. [Download and install the .NET Core SDK](https://dotnet.microsoft.com/download)
* If you don't have `localdb` available on your system, [Download and install SQL Server Express](https://docs.microsoft.com/en-us/sql/database-engine/configure-windows/sql-server-express-localdb)
2. Open a terminal such as **PowerShell**, **Command Prompt**, or **bash** and navigate to the `src/MediatRAndRecordTypes.Api` folder
3. Run the following `dotnet` commands:
```sh
dotnet build
dotnet run
```
3. Open your browser to: `https://localhost:5001`.

## To Run the Integration tests
1. [Download and install the .NET Core SDK](https://dotnet.microsoft.com/download)
* If you don't have `localdb` available on your system, [Download and install SQL Server Express](https://docs.microsoft.com/en-us/sql/database-engine/configure-windows/sql-server-express-localdb)
2. Open a terminal such as **PowerShell**, **Command Prompt**, or **bash** and run the following command:
`dotnet test`