Interface IDbContextBuilder
Used for building Microsoft.EntityFrameworkCore.DbContext.
Namespace:MyTested.AspNetCore.Mvc.Builders.Contracts.Data
Assembly:MyTested.AspNetCore.Mvc.EntityFrameworkCore.dll
Syntax
public interface IDbContextBuilder
Methods
|
Improve this Doc
View Source
WithEntities(Action<DbContext>)
Sets initial values to the registered Microsoft.EntityFrameworkCore.DbContext.
Declaration
IAndDbContextBuilder WithEntities(Action<DbContext> dbContextSetup)
Parameters
Type |
Name |
Description |
System.Action<Microsoft.EntityFrameworkCore.DbContext> |
dbContextSetup |
Action setting the Microsoft.EntityFrameworkCore.DbContext.
|
Returns
Type |
Description |
MyTested.AspNetCore.Mvc.Builders.Contracts.Data.IAndDbContextBuilder |
|
|
Improve this Doc
View Source
WithEntities<TDbContext>(Action<TDbContext>)
Sets initial values to the provided Microsoft.EntityFrameworkCore.DbContext.
Declaration
IAndDbContextBuilder WithEntities<TDbContext>(Action<TDbContext> dbContextSetup)where TDbContext : DbContext
Parameters
Type |
Name |
Description |
System.Action<TDbContext> |
dbContextSetup |
Action setting the Microsoft.EntityFrameworkCore.DbContext.
|
Returns
Type |
Description |
MyTested.AspNetCore.Mvc.Builders.Contracts.Data.IAndDbContextBuilder |
|
Type Parameters
Name |
Description |
TDbContext |
Type of Microsoft.EntityFrameworkCore.DbContext to set up. |
|
Improve this Doc
View Source
WithSet<TEntity>(Action<DbSet<TEntity>>)
Sets initial values to the provided Microsoft.EntityFrameworkCore.DbContext entity.
Declaration
IAndDbContextBuilder WithSet<TEntity>(Action<DbSet<TEntity>> entitySetup)where TEntity : class
Parameters
Type |
Name |
Description |
System.Action<Microsoft.EntityFrameworkCore.DbSet<TEntity>> |
entitySetup |
Action setting the Microsoft.EntityFrameworkCore.DbContext entity.
|
Returns
Type |
Description |
MyTested.AspNetCore.Mvc.Builders.Contracts.Data.IAndDbContextBuilder |
|
Type Parameters
Name |
Description |
TEntity |
Type of entity to set up. |
|
Improve this Doc
View Source
WithSet<TDbContext, TEntity>(Action<DbSet<TEntity>>)
Sets initial values to the provided Microsoft.EntityFrameworkCore.DbContext entity.
Declaration
IAndDbContextBuilder WithSet<TDbContext, TEntity>(Action<DbSet<TEntity>> entitySetup)where TDbContext : DbContext where TEntity : class
Parameters
Type |
Name |
Description |
System.Action<Microsoft.EntityFrameworkCore.DbSet<TEntity>> |
entitySetup |
Action setting the Microsoft.EntityFrameworkCore.DbContext entity.
|
Returns
Type |
Description |
MyTested.AspNetCore.Mvc.Builders.Contracts.Data.IAndDbContextBuilder |
|
Type Parameters
Name |
Description |
TDbContext |
Type of Microsoft.EntityFrameworkCore.DbContext to set up. |
TEntity |
Type of entity to set up. |