Skip to content

mezzo1981/Community.NServiceBus.WebHost

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

50 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Community.NServiceBus.WebHost

This package integrates NServiceBus with the ASP.NET Core 2.x host (WebHost).

DO NOT USE THIS PACKAGE IF YOU ARE ON ASP.NET CORE 3! Use https://github.com/Particular/NServiceBus.Extensions.Hosting instead.

Usage

  1. Install the Community.NServiceBus.WebHost package.
  2. In the ConfigureServices method of the Startup class, use services.AddNServiceBus to pass an endpoint configuration:
public void ConfigureServices(IServiceCollection services)
{
    ...

    var endpointConfiguration = new EndpointConfiguration(<endpoint-name>);
    // configure the endpoint here
    services.AddNServiceBus(endpointConfiguration);
}

This extensions registers IMessageSession with the DI container so it can be injected into controllers, page models and more.

See the demo project in this repository for an example usage.

About

NServiceBus extension to support Microsoft.Extensions.Hosting

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

  • C# 55.3%
  • HTML 41.3%
  • CSS 2.7%
  • JavaScript 0.7%