Class ComponentBuilderEntityFrameworkCoreExtensions
Contains Microsoft.EntityFrameworkCore.DbContext extension methods for IBaseTestBuilderWithComponentBuilder<TBuilder>.
Inheritance
System.Object
ComponentBuilderEntityFrameworkCoreExtensions
Namespace:MyTested.AspNetCore.Mvc
Assembly:MyTested.AspNetCore.Mvc.EntityFrameworkCore.dll
Syntax
public static class ComponentBuilderEntityFrameworkCoreExtensions
Methods
| Improve this Doc View SourceWithDbContext<TBuilder>(IBaseTestBuilderWithComponentBuilder<TBuilder>, Action<IDbContextBuilder>)
Sets initial values to the Microsoft.EntityFrameworkCore.DbContext on the tested component.
Declaration
public static TBuilder WithDbContext<TBuilder>(this IBaseTestBuilderWithComponentBuilder<TBuilder> builder, Action<IDbContextBuilder> dbContextBuilder)where TBuilder : IBaseTestBuilder
Parameters
Type | Name | Description |
---|---|---|
IBaseTestBuilderWithComponentBuilder<TBuilder> | builder | Instance of IBaseTestBuilderWithComponentBuilder<TBuilder> type. |
System.Action<IDbContextBuilder> | dbContextBuilder | Action setting the Microsoft.EntityFrameworkCore.DbContext by using IDbContextBuilder. |
Returns
Type | Description |
---|---|
TBuilder | The same component builder. |
Type Parameters
Name | Description |
---|---|
TBuilder | Class representing ASP.NET Core MVC test builder. |