This is a demonstration of how easy it is to implement MassTransit in a simple .NET CRUD API. You can read the full tutorial here. It contains a simple implementation of MassTransit with communication to RabbitMQ on a CRUD service for products, that can easily be extended. The service will create new products in the database using a publisher and consumer.
Key Features • How To Use • Download • Credits • License
- MassTransit for easily building a reliable distributed application
- Choose your own connector: RabbitMq, Azure Service Bus, Amazon SQS or In-Memory.
- Simple CRUD implementation
- Super simple CRUD service implementation that can easily be extended.
- Error Handler Middleware
- Global Error Handler Middleware taking care of exceptions in the applicaiton, providing the client with a consistent response every time. This can easily be extended with custom exceptions.
- Well documented Code (inline + wiki)
- Automatic mapping
- Automatic Mapping of DTOs to/from Domain Models using AutoMapper.
- Database Integration using Entity Framework Core.
- MediatR (CQRS)
- Implementation of CQRS using MediatR. All controllers will consume the mediator to handle commands and queries.
To clone and run this simple .NET Web API, you'll need Git and .NET SDK. From your command line:
# Clone this repository
$ git clone https://github.com/Tech-With-Christian/MassTransitDemo.git
# Go into the repository
$ cd masstransitdemo
# Restore dependencies
$ dotnet restore
# Run the app
$ dotnet watch
You can download the latest main version of this MassTransit .NET CRUD API Demo for further development on Windows, macOS and Linux.
This software uses the following open source packages:
MIT
christian-schou.dk · GitHub @Christian-Schou · Blog blog.christian-schou.dk