Skip to content

Tassadar2499/AspNetCore.DIToolKit

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

AspNetCore.DIToolKit

Simple injection of ASP.NET Core services. Just implement one of selected interfaces: LifeTime.ISingleton, LifeTime.IScoped or LifeTime.ITransient.

Example

Create your service by implementing one of the lifetime interfaces:

public interface IGreetingService
{
    string Greet();
}

public class GreetingService : IGreetingService, LifeTime.ITransient
{
    public string Greet() => "Hello from transient service!";
}

And register all services automatically:

builder.Services.ConfigureServicesByLifeTimeCycle(builder.Configuration);

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages