Show / Hide Table of Contents

Class InMemoryEntityFrameworkDatabaseComponent<TDbContext>

A component for hosting an in-memory database managed via Entity Framework.

The following objects are published to the environment pipeline data:

- Type: System.String. Key: EntityFrameworkDatabaseName<TDbContext>().

- Type: Microsoft.EntityFrameworkCore.Storage.InMemoryDatabaseRoot. Key: EntityFrameworkInMemoryDatabaseRoot<TDbContext>().

Inheritance
System.Object
EntityFrameworkDatabaseComponentBase<TDbContext>
InMemoryEntityFrameworkDatabaseComponent<TDbContext>
Implements
IEntityFrameworkDatabaseComponent<TDbContext>
IAccelergreatComponent
IAsyncDisposable
Inherited Members
EntityFrameworkDatabaseComponentBase<TDbContext>.AutoRegisterGlobalDataItemsInDbContextCreation
EntityFrameworkDatabaseComponentBase<TDbContext>.GlobalDataItems
EntityFrameworkDatabaseComponentBase<TDbContext>.GlobalDataItemsOfType<T>()
EntityFrameworkDatabaseComponentBase<TDbContext>.DbContextFactory
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: Accelergreat.EntityFramework.InMemory
Assembly: Accelergreat.EntityFramework.InMemory.dll
Syntax
public class InMemoryEntityFrameworkDatabaseComponent<TDbContext> : EntityFrameworkDatabaseComponentBase<TDbContext>, IEntityFrameworkDatabaseComponent<TDbContext>, IAccelergreatComponent where TDbContext : DbContext
Type Parameters
Name Description
TDbContext

Constructors

InMemoryEntityFrameworkDatabaseComponent()

Declaration
public InMemoryEntityFrameworkDatabaseComponent()

Methods

ConfigureDbContextOptions(InMemoryDbContextOptionsBuilder)

Declaration
protected virtual void ConfigureDbContextOptions(InMemoryDbContextOptionsBuilder options)
Parameters
Type Name Description
Microsoft.EntityFrameworkCore.Infrastructure.InMemoryDbContextOptionsBuilder options

DisposeAsync(Boolean)

Declaration
protected virtual async ValueTask DisposeAsync(bool disposing)
Parameters
Type Name Description
System.Boolean disposing
Returns
Type Description
ValueTask

OnDatabaseInitializedAsync(TDbContext)

Called after the database has been created.

Override this method to persist any changes to the database that will be globally available to all tests.

Declaration
protected virtual Task OnDatabaseInitializedAsync(TDbContext context)
Parameters
Type Name Description
TDbContext context
Returns
Type Description
Task

Implements

IEntityFrameworkDatabaseComponent<TDbContext>
IAccelergreatComponent
IAsyncDisposable
In This Article
Back to top Copyright © Nanogunn Ltd.