RelationalDatabase RelationalDatabase Class

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.

Syntax

Declaration

public class RelationalDatabase : Database, IDatabasePublic Class RelationalDatabase
    Inherits Database
    Implements IDatabase

Inheritance Hierarchy

  • System.Object
    System.Object
  • RelationalDatabase
    RelationalDatabase

Inherited Members

CompileQuery<TResult>(QueryModel),
CompileQuery(Of TResult)(QueryModel),
CompileAsyncQuery<TResult>(QueryModel),
CompileAsyncQuery(Of TResult)(QueryModel),
ToString(),
ToString(),
Equals(Object),
Equals(Object),
Equals(Object, Object),
Equals(Object, Object),
ReferenceEquals(Object, Object),
ReferenceEquals(Object, Object),
GetHashCode(),
GetHashCode(),
GetType(),
GetType(),
MemberwiseClone()
MemberwiseClone()

Constructors summary

Initializes a new instance of the RelationalDatabase class.

Methods summary

Persists changes from the supplied entries to the database.

Asynchronously persists changes from the supplied entries to the database.

Constructors

Methods

  • SaveChanges(IReadOnlyList<IUpdateEntry>)
    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<T><IUpdateEntry>
      System.Collections.Generic.IReadOnlyList<T>(Of IUpdateEntry)

      Entries representing the changes to be persisted.

    Returns

    • System.Int32
      System.Int32

      The number of state entries persisted to the database.

  • SaveChangesAsync(IReadOnlyList<IUpdateEntry>, 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<T><IUpdateEntry>
      System.Collections.Generic.IReadOnlyList<T>(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<TResult><System.Int32>
      System.Threading.Tasks.Task<TResult>(Of System.Int32)

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

Details

Assembly

Microsoft.EntityFrameworkCore.Relational.dll