RelationalDatabase 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 : Database, IDatabase
Public Class RelationalDatabase
    Inherits Database
    Implements IDatabase
Inheritance
System.ObjectSystem.Object
RelationalDatabaseRelationalDatabase
Implements

Constructors

RelationalDatabase(IQueryCompilationContextFactory, ICommandBatchPreparer, IBatchExecutor, IRelationalConnection) RelationalDatabase(IQueryCompilationContextFactory, ICommandBatchPreparer, IBatchExecutor, IRelationalConnection)

Initializes a new instance of the RelationalDatabase class.

public RelationalDatabase(IQueryCompilationContextFactory queryCompilationContextFactory, ICommandBatchPreparer batchPreparer, IBatchExecutor batchExecutor, IRelationalConnection connection)
Public Sub New(queryCompilationContextFactory As IQueryCompilationContextFactory, batchPreparer As ICommandBatchPreparer, batchExecutor As IBatchExecutor, connection As IRelationalConnection)
Parameters
batchExecutor
IBatchExecutor IBatchExecutor

The IBatchExecutor to be used.

Methods

CompileAsyncQuery(QueryModel) CompileAsyncQuery(Of 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(QueryModel) CompileQuery(Of TResult)(QueryModel)

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

(Inherited from Database)

Equals(Object) Equals(Object)

Inherited from System.Object

Equals(Object, Object) Equals(Object, Object)

Inherited from System.Object

GetHashCode() GetHashCode()

Inherited from System.Object

GetType() GetType()

Inherited from System.Object

MemberwiseClone() MemberwiseClone()

Inherited from System.Object

ReferenceEquals(Object, Object) ReferenceEquals(Object, Object)

Inherited from System.Object

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

Persists changes from the supplied entries to the database.

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)

Entries representing the changes to be persisted.

Returns
System.Int32 System.Int32

The number of state entries persisted to the database.

Overrides

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

Asynchronously persists changes from the supplied entries to the database.

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)

Entries representing the changes to be persisted.

cancellationToken
System.Threading.CancellationToken System.Threading.CancellationToken

A System.Threading.CancellationToken to observe while waiting for the task to complete.

Returns
System.Threading.Tasks.Task<System.Int32> System.Threading.Tasks.Task(Of System.Int32)

A task that represents the asynchronous save operation. The task result contains the number of entries persisted to the database.

Overrides

ToString() ToString()

Inherited from System.Object