Skip to content

event-driven-dotnet/EventDriven.DependencyInjection

Repository files navigation

EventDriven.DependencyInjection

Helper methods for configuring services with dependency injection.

Usage

  • In a Web API project.
builder.Services.AddAppSettings<MyAppSettings>(builder.Configuration);
  • In a console project.
var host = Host
    .CreateDefaultBuilder(args)
    .ConfigureServices(services =>
    {
        var config = services.BuildServiceProvider()
            .GetRequiredService<IConfiguration>();
        services.AddAppSettings<MyAppSettings>(config);
    })
    .Build();

About

Helper methods for configuring services with dependency injection.

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages