InMemoryDatabase InMemoryDatabase Class

Definition

This API supports the Entity Framework Core infrastructure and is not intended to be used directly from your code. This API may change or be removed in future releases.

public class InMemoryDatabase : Database, IInMemoryDatabase, IDatabase
Public Class InMemoryDatabase
    Inherits Database
    Implements IInMemoryDatabase, IDatabase
Inheritance
System.ObjectSystem.Object
InMemoryDatabaseInMemoryDatabase
Implements

Inherited Members

Microsoft.EntityFrameworkCore.Storage.Database

System.Object

System.Object.ToString()System.Object.ToString()
System.Object.Equals(System.Object)System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetHashCode()System.Object.GetHashCode()
System.Object.GetType()System.Object.GetType()
System.Object.MemberwiseClone()System.Object.MemberwiseClone()

Constructors

InMemoryDatabase(IQueryCompilationContextFactory, IInMemoryStoreSource, IDbContextOptions, ILogger) InMemoryDatabase(IQueryCompilationContextFactory, IInMemoryStoreSource, IDbContextOptions, ILogger(Of InMemoryDatabase))

This API supports the Entity Framework Core infrastructure and is not intended to be used directly from your code. This API may change or be removed in future releases.

public InMemoryDatabase(IQueryCompilationContextFactory queryCompilationContextFactory, IInMemoryStoreSource storeSource, IDbContextOptions options, ILogger<InMemoryDatabase> logger)
Public Sub New(queryCompilationContextFactory As IQueryCompilationContextFactory, storeSource As IInMemoryStoreSource, options As IDbContextOptions, logger As ILogger(Of InMemoryDatabase))
Parameters
logger
ILogger<InMemoryDatabase> ILogger(Of InMemoryDatabase)

Properties

Store Store

This API supports the Entity Framework Core infrastructure and is not intended to be used directly from your code. This API may change or be removed in future releases.

public virtual IInMemoryStore Store { get; }
Public Overridable ReadOnly Property Store As IInMemoryStore

Methods

CompileAsyncQuery(QueryModel) CompileAsyncQuery(Of TResult)(QueryModel)

This API supports the Entity Framework Core infrastructure and is not intended to be used directly from your code. This API may change or be removed in future releases.

public override Func<QueryContext, IAsyncEnumerable<TResult>> CompileAsyncQuery<TResult>(QueryModel queryModel)
Public Overrides Function CompileAsyncQuery(Of TResult)(queryModel As QueryModel) As Func(Of QueryContext, IAsyncEnumerable(Of TResult))
Type Parameters
TResult
Parameters
queryModel
QueryModel QueryModel
Returns
System.Func<QueryContext, IAsyncEnumerable<TResult>> System.Func(Of QueryContext, IAsyncEnumerable(Of TResult))

EnsureDatabaseCreated(IModel) EnsureDatabaseCreated(IModel)

This API supports the Entity Framework Core infrastructure and is not intended to be used directly from your code. This API may change or be removed in future releases.

public virtual bool EnsureDatabaseCreated(IModel model)
Public Overridable Function EnsureDatabaseCreated(model As IModel) As Boolean
Parameters
model
IModel IModel
Returns
System.Boolean System.Boolean

SaveChanges(IReadOnlyList) SaveChanges(IReadOnlyList(Of IUpdateEntry))

This API supports the Entity Framework Core infrastructure and is not intended to be used directly from your code. This API may change or be removed in future releases.

public override int SaveChanges(IReadOnlyList<IUpdateEntry> entries)
Public Overrides Function SaveChanges(entries As IReadOnlyList(Of IUpdateEntry)) As Integer
Parameters
entries
System.Collections.Generic.IReadOnlyList<IUpdateEntry> System.Collections.Generic.IReadOnlyList(Of IUpdateEntry)
Returns
System.Int32 System.Int32
Overrides

SaveChangesAsync(IReadOnlyList, CancellationToken) SaveChangesAsync(IReadOnlyList(Of IUpdateEntry), CancellationToken)

This API supports the Entity Framework Core infrastructure and is not intended to be used directly from your code. This API may change or be removed in future releases.

public override Task<int> SaveChangesAsync(IReadOnlyList<IUpdateEntry> entries, CancellationToken cancellationToken = null)
Public Overrides Function SaveChangesAsync(entries As IReadOnlyList(Of IUpdateEntry), cancellationToken As CancellationToken = Nothing) As Task(Of Integer)
Parameters
entries
System.Collections.Generic.IReadOnlyList<IUpdateEntry> System.Collections.Generic.IReadOnlyList(Of IUpdateEntry)
cancellationToken
System.Threading.CancellationToken System.Threading.CancellationToken
Returns
System.Threading.Tasks.Task<System.Int32> System.Threading.Tasks.Task(Of System.Int32)
Overrides