Package to support Microsoft Dependency Injection for Forbid package.
Using dotnet cli
dotnet add package Forbid.Extensions.Microsoft.DependencyInjection --version 1.0.0
or package reference
<PackageReference Include="Forbid.Extensions.Microsoft.DependencyInjection" Version="1.0.0" />
using Forbids;
public void ConfigureServices(IServiceCollection services)
{
services.AddForbids();
}
Or
using Forbids;
public void ConfigureServices(IServiceCollection services)
{
services.AddForbids(ServiceLifetime.Scoped); //default is Singleton
}