Home Update How to make use of MediatR in ASP.Net Core

How to make use of MediatR in ASP.Net Core

244


MediatR is an open supply venture and an implementation of the mediator design sample. The mediator design sample controls how a set of objects talk and helps to scale back the variety of dependencies amongst these objects that you will need to handle. In the mediator design sample, objects don’t talk with each other straight, however by way of a mediator. This article presents a dialogue of how we will use MediatR in ASP.Net Core functions.

Create an ASP.Net Core venture in Visual Studio

First off, let’s create an ASP.Net Core venture in Visual Studio. Assuming Visual Studio 2017 or Visual Studio 2019 is put in in your system, observe the steps outlined beneath to create a brand new ASP.Net Core venture in Visual Studio.

  1. Launch the Visual Studio IDE.
  2. Click on “Create new project.”
  3. In the “Create new project” window, choose “ASP.Net Core Web Application” from the checklist of templates displayed.
  4. Click Next. 
  5. In the “Configure your new project” window that’s proven subsequent, specify the title and placement for the brand new venture.
  6. Click Create. 
  7. A brand new window “Create New ASP.Net Core Web Application” is proven subsequent.
  8. Select .Net Core because the runtime and ASP.Net Core 2.2 (or later) from the drop-down checklist on the prime.
  9. Select “Web Application” because the venture template.
  10. Ensure that the verify packing containers “Enable Docker Support” and “Configure for HTTPS” are unchecked as we gained’t be utilizing these options right here.
  11. Ensure that Authentication is ready as “No Authentication” as we gained’t be utilizing authentication both.
  12. Click Create. 

This will create a brand new ASP.Net Core venture in Visual Studio. We’ll use this venture within the subsequent sections of this text to implement our mediator sample with MediatR.

Install MediatR in your ASP.Net Core venture



Source hyperlink

LEAVE A REPLY

Please enter your comment!
Please enter your name here