Class UnitOfWorkServiceCollectionExtensions
Inheritance
System.Object
UnitOfWorkServiceCollectionExtensions
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: Microsoft.Extensions.DependencyInjection
Assembly: WaCore.Data.Ef.dll
Syntax
public static class UnitOfWorkServiceCollectionExtensions
Methods
| Improve this Doc View SourceAddUnitOfWork<TDbContext>(IServiceCollection, Action<RepositoryConfiguration<TDbContext, IWacUnitOfWork>>)
Declaration
public static IServiceCollection AddUnitOfWork<TDbContext>(this IServiceCollection serviceCollection, Action<RepositoryConfiguration<TDbContext, IWacUnitOfWork>> repositoryConfiguration)where TDbContext : DbContext
Parameters
Type | Name | Description |
---|---|---|
Microsoft.Extensions.DependencyInjection.IServiceCollection | serviceCollection | |
System.Action<RepositoryConfiguration<TDbContext, IWacUnitOfWork>> | repositoryConfiguration |
Returns
Type | Description |
---|---|
Microsoft.Extensions.DependencyInjection.IServiceCollection |
Type Parameters
Name | Description |
---|---|
TDbContext |
AddUnitOfWork<TDbContext, TUnitOfWorkService, TUnitOfWorkImplementation>(IServiceCollection, Action<RepositoryConfiguration<TDbContext, TUnitOfWorkService>>, ServiceLifetime)
Declaration
public static IServiceCollection AddUnitOfWork<TDbContext, TUnitOfWorkService, TUnitOfWorkImplementation>(this IServiceCollection serviceCollection, Action<RepositoryConfiguration<TDbContext, TUnitOfWorkService>> repositoryConfiguration, ServiceLifetime serviceLifetime = ServiceLifetime.Scoped)where TDbContext : DbContext where TUnitOfWorkService : class, IWacUnitOfWork where TUnitOfWorkImplementation : WacEfUnitOfWork<TDbContext>, TUnitOfWorkService
Parameters
Type | Name | Description |
---|---|---|
Microsoft.Extensions.DependencyInjection.IServiceCollection | serviceCollection | |
System.Action<RepositoryConfiguration<TDbContext, TUnitOfWorkService>> | repositoryConfiguration | |
Microsoft.Extensions.DependencyInjection.ServiceLifetime | serviceLifetime |
Returns
Type | Description |
---|---|
Microsoft.Extensions.DependencyInjection.IServiceCollection |
Type Parameters
Name | Description |
---|---|
TDbContext | |
TUnitOfWorkService | |
TUnitOfWorkImplementation |