Class SilverbackBuilderUseDbContextExtensions
Contains the UseDbContext extension for the ISilverbackBuilder.
Inherited Members
Namespace: Microsoft.Extensions.DependencyInjection
Assembly: Silverback.Core.EFCore30.dll
Syntax
public static class SilverbackBuilderUseDbContextExtensions
Methods
| Improve this doc View sourceUseDbContext<TDbContext>(ISilverbackBuilder)
Registers the specified DbContext to be used as underlying storage for the services requiring it.
Declaration
public static ISilverbackBuilder UseDbContext<TDbContext>(this ISilverbackBuilder builder) where TDbContext : DbContext
Parameters
| Type | Name | Description |
|---|---|---|
| ISilverbackBuilder | builder | The ISilverbackBuilder to add the DbContext to. |
Returns
| Type | Description |
|---|---|
| ISilverbackBuilder | The ISilverbackBuilder so that additional calls can be chained. |
Type Parameters
| Name | Description |
|---|---|
| TDbContext | The type of the DbContext to be used. |