External Libraries - Create Separate Class Library

 

In Visual Studio, Create a Blank Solution, Create a solution folder ‘MsExternalBlocks’

Add New Project - A Class Library under folder MsExternalBlocks

In Explorer some like this

 

Actually we will also install all common NuGet packages for each microservices into ‘MsExternalBlocks’. Whenever a new microservice comes into the picture, we will just reference to the ‘MsExternalBlocks’ and start writing the code with all common NuGet packages.

This also provide version management of NuGet packages make easier in one class library. Instead of installing the mediator for different microservices, we will only install in one place and It will be easy to managing versions.

 

Step 1: Create Handlers in Class Library

Step 2: Create Endpoints in Class Library

 


Related Question