Share via


RelationalDatabase Class

Definition

The main interaction point between a context and the database provider.

This type is typically used by database providers (and other extensions). It is generally not used in application code.

public class RelationalDatabase : Microsoft.EntityFrameworkCore.Storage.Database
type RelationalDatabase = class
    inherit Database
Public Class RelationalDatabase
Inherits Database
Inheritance
RelationalDatabase

Remarks

The service lifetime is Scoped. This means that each DbContext instance will use its own instance of this service. The implementation may depend on other services registered with any lifetime. The implementation does not need to be thread-safe.

See Implementation of database providers and extensions for more information and examples.

Constructors

RelationalDatabase(DatabaseDependencies, RelationalDatabaseDependencies)

Initializes a new instance of the RelationalDatabase class.

RelationalDatabase(IQueryCompilationContextFactory, ICommandBatchPreparer, IBatchExecutor, IRelationalConnection)

Initializes a new instance of the RelationalDatabase class.

Properties

Dependencies

Dependencies for this service.

(Inherited from Database)
RelationalDependencies

Relational provider-specific dependencies for this service.

Methods

CompileAsyncQuery<TResult>(QueryModel)

Translates a query model into a function that can be executed to asynchronously get query results from the database.

(Inherited from Database)
CompileQuery<TResult>(Expression, Boolean)

Compiles the given query to generate a Func<T,TResult>.

(Inherited from Database)
CompileQuery<TResult>(QueryModel)

Translates a query model into a function that can be executed to get query results from the database.

(Inherited from Database)
SaveChanges(IList<IUpdateEntry>)

Persists changes from the supplied entries to the database.

SaveChanges(IList<IUpdateEntry>)

Persists changes from the supplied entries to the database.

(Inherited from Database)
SaveChanges(IReadOnlyList<IUpdateEntry>)

Persists changes from the supplied entries to the database.

SaveChanges(IReadOnlyList<IUpdateEntry>)

Persists changes from the supplied entries to the database.

(Inherited from Database)
SaveChangesAsync(IList<IUpdateEntry>, CancellationToken)

Asynchronously persists changes from the supplied entries to the database.

SaveChangesAsync(IList<IUpdateEntry>, CancellationToken)

Asynchronously persists changes from the supplied entries to the database.

(Inherited from Database)
SaveChangesAsync(IReadOnlyList<IUpdateEntry>, CancellationToken)

Asynchronously persists changes from the supplied entries to the database.

SaveChangesAsync(IReadOnlyList<IUpdateEntry>, CancellationToken)

Asynchronously persists changes from the supplied entries to the database.

(Inherited from Database)

Applies to