All Projects → Kahbazi → MediatR.AspNetCore.Endpoints

Kahbazi / MediatR.AspNetCore.Endpoints

Licence: MIT license
No description or website provided.

Programming Languages

C#
18002 projects

Projects that are alternatives of or similar to MediatR.AspNetCore.Endpoints

CleanArchitecture-Template
This is a solution template for Clean Architecture and CQRS implementation with ASP.NET Core.
Stars: ✭ 60 (-32.58%)
Mutual labels:  asp-net-core, mediatr
RCM
RCM is a simple CRM application designed for Auto Parts Store made with ASP.NET Core based on DDD, CQRS and SOLID Principles.
Stars: ✭ 29 (-67.42%)
Mutual labels:  asp-net-core, mediatr
mediatr-netcore-sample
Example of using mediatr with asp.net core
Stars: ✭ 14 (-84.27%)
Mutual labels:  asp-net-core, mediatr
Equinoxproject
Full ASP.NET Core 5 application with DDD, CQRS and Event Sourcing concepts
Stars: ✭ 5,120 (+5652.81%)
Mutual labels:  asp-net-core, mediatr
MediatrTutorial
CQRS implementation in ASP.NET Core using MediatR in .NET 5
Stars: ✭ 88 (-1.12%)
Mutual labels:  asp-net-core, mediatr
CleanArchitecture
Clean Architecture Solution for .NET 5
Stars: ✭ 18 (-79.78%)
Mutual labels:  asp-net-core, mediatr
GPONMonitor
GPON Monitoring tool for Dasan Networks GPON OLTs
Stars: ✭ 26 (-70.79%)
Mutual labels:  asp-net-core
Asmin
Asmin is .NET CORE project infrastructure, to get a quick start on the project.
Stars: ✭ 89 (+0%)
Mutual labels:  asp-net-core
DNTCaptcha.Core
DNTCaptcha.Core is a captcha generator and validator for ASP.NET Core applications
Stars: ✭ 181 (+103.37%)
Mutual labels:  asp-net-core
planningpoker4azure
Planning Poker 4 Azure
Stars: ✭ 49 (-44.94%)
Mutual labels:  asp-net-core
simple-blog-back
Back-End for Simple Blog
Stars: ✭ 36 (-59.55%)
Mutual labels:  asp-net-core
AspNetCoreMvcAngular
ASP.NET Core MVC with angular in MVC View OpenID Connect Hybrid Flow
Stars: ✭ 54 (-39.33%)
Mutual labels:  asp-net-core
Database-First-ASP.Net-Core
Demo implementation of a Database First REST API in ASP.Net Core
Stars: ✭ 17 (-80.9%)
Mutual labels:  asp-net-core
CodeIndex
A Code Index Searching Tools Based On Lucene.Net
Stars: ✭ 28 (-68.54%)
Mutual labels:  asp-net-core
I18N
I18N Library for .NET, and Delphi
Stars: ✭ 48 (-46.07%)
Mutual labels:  asp-net-core
Car-Rental-Project
A car rental project developed with ASP.Net Core & Angular.
Stars: ✭ 90 (+1.12%)
Mutual labels:  asp-net-core
NClient
💫 NClient is an automatic type-safe .Net HTTP client that allows you to call web service API methods using annotated interfaces or controllers without boilerplate code.
Stars: ✭ 25 (-71.91%)
Mutual labels:  asp-net-core
TheLastTime
C# .NET 5 Blazor WebAssembly Progressive Web Application that tracks when was the last time you did something
Stars: ✭ 23 (-74.16%)
Mutual labels:  asp-net-core
aspnetcore2aadauth
ASP.NET Core 2.0 Azure AD authentication example
Stars: ✭ 37 (-58.43%)
Mutual labels:  asp-net-core
RestWithASP-NETUdemy
No description or website provided.
Stars: ✭ 40 (-55.06%)
Mutual labels:  asp-net-core

MediatR.AspNetCore.Endpoints

NuGet

Getting Started

Startup.cs

public class Startup
{
    public void ConfigureServices(IServiceCollection services)
    {
        services.AddMediatR(GetType().Assembly);
        services.AddMediatREndpoints();
    }

    public void Configure(IApplicationBuilder app)
    {
        app.UseRouting();

        app.UseEndpoints(endpoints =>
        {
            endpoints.MapMediatR();
        });
    }
}

RequestHandler

public class SampleRequestHandler : IRequestHandler<SampleRequest, SampleResponse>
{
    [HttpPost("SampleRequest")]
    public async Task<SampleResponse> Handle(SampleRequest request, CancellationToken cancellationToken)
    {
        await Task.Delay(200);

        return new SampleResponse
        {
            Name = "Kahbazi",
            Timestamp = DateTime.Now
        };
    }
}

Request

public class SampleRequest : IRequest<SampleResponse>
{
    public int Id { get; set; }
}

Response

public class SampleResponse
{
    public string Name { get; set; }

    public DateTime Timestamp { get; set; }
}

Bechmark for a simple http request

Request:

{
  "Id" : 47,
  "Name" : "kahbazi"
}

Response:

{
  "Message" : "Hello kahbazi"
}
Method Mean Error StdDev Rank Gen 0 Gen 1 Gen 2 Allocated
MediatR.AspNetCore.Endpoints 56.14 us 1.427 us 2.462 us 1 2.9297 - - 9.18 KB
Microsoft.AspNetCore.Mvc 151.90 us 2.980 us 3.060 us 2 4.8828 - - 16.29 KB
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].