Class SilverbackBuilderUseDbContextExtensions
Contains the UseDbContext
extension for the ISilverbackBuilder.
Inheritance
System.Object
SilverbackBuilderUseDbContextExtensions
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: Silverback.Core.EFCore30.dll
Syntax
public static class SilverbackBuilderUseDbContextExtensions
Methods
| Improve this doc View sourceUseDbContext<TDbContext>(ISilverbackBuilder)
Registers the specified Microsoft.EntityFrameworkCore.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 Microsoft.EntityFrameworkCore.DbContext to. |
Returns
Type | Description |
---|---|
ISilverbackBuilder | The ISilverbackBuilder so that additional calls can be chained. |
Type Parameters
Name | Description |
---|---|
TDbContext | The type of the Microsoft.EntityFrameworkCore.DbContext to be used. |