HistoryRepository HistoryRepository Class

Definition

public abstract class HistoryRepository : IHistoryRepository
Public MustInherit Class HistoryRepository
    Implements IHistoryRepository
Inheritance
System.ObjectSystem.Object
HistoryRepositoryHistoryRepository
Implements

Constructors

HistoryRepository(IDatabaseCreator, IRawSqlCommandBuilder, IRelationalConnection, IDbContextOptions, IMigrationsModelDiffer, IMigrationsSqlGenerator, IRelationalAnnotationProvider, ISqlGenerationHelper) HistoryRepository(IDatabaseCreator, IRawSqlCommandBuilder, IRelationalConnection, IDbContextOptions, IMigrationsModelDiffer, IMigrationsSqlGenerator, IRelationalAnnotationProvider, ISqlGenerationHelper)

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.

protected HistoryRepository(IDatabaseCreator databaseCreator, IRawSqlCommandBuilder rawSqlCommandBuilder, IRelationalConnection connection, IDbContextOptions options, IMigrationsModelDiffer modelDiffer, IMigrationsSqlGenerator migrationsSqlGenerator, IRelationalAnnotationProvider annotations, ISqlGenerationHelper sqlGenerationHelper)
Protected Sub New(databaseCreator As IDatabaseCreator, rawSqlCommandBuilder As IRawSqlCommandBuilder, connection As IRelationalConnection, options As IDbContextOptions, modelDiffer As IMigrationsModelDiffer, migrationsSqlGenerator As IMigrationsSqlGenerator, annotations As IRelationalAnnotationProvider, sqlGenerationHelper As ISqlGenerationHelper)
Parameters

Fields

DefaultTableName DefaultTableName

public const string DefaultTableName = "__EFMigrationsHistory"
Public Const DefaultTableName As String = "__EFMigrationsHistory"

Properties

ExistsSql ExistsSql

protected abstract string ExistsSql { get; }
Protected MustOverride ReadOnly Property ExistsSql As String
Value
System.String System.String

GetAppliedMigrationsSql GetAppliedMigrationsSql

protected virtual string GetAppliedMigrationsSql { get; }
Protected Overridable ReadOnly Property GetAppliedMigrationsSql As String
Value
System.String System.String

MigrationIdColumnName MigrationIdColumnName

protected virtual string MigrationIdColumnName { get; }
Protected Overridable ReadOnly Property MigrationIdColumnName As String
Value
System.String System.String

ProductVersionColumnName ProductVersionColumnName

protected virtual string ProductVersionColumnName { get; }
Protected Overridable ReadOnly Property ProductVersionColumnName As String
Value
System.String System.String

SqlGenerationHelper SqlGenerationHelper

protected virtual ISqlGenerationHelper SqlGenerationHelper { get; }
Protected Overridable ReadOnly Property SqlGenerationHelper As ISqlGenerationHelper

TableName TableName

protected virtual string TableName { get; }
Protected Overridable ReadOnly Property TableName As String
Value
System.String System.String

TableSchema TableSchema

protected virtual string TableSchema { get; }
Protected Overridable ReadOnly Property TableSchema As String
Value
System.String System.String

Methods

ConfigureTable(EntityTypeBuilder) ConfigureTable(EntityTypeBuilder(Of HistoryRow))

protected virtual void ConfigureTable(EntityTypeBuilder<HistoryRow> history)
Protected Overridable Sub ConfigureTable(history As EntityTypeBuilder(Of HistoryRow))
Parameters

Equals(Object) Equals(Object)

Inherited from System.Object

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

Inherited from System.Object

Exists() Exists()

public virtual bool Exists()
Public Overridable Function Exists As Boolean
Returns
System.Boolean System.Boolean

ExistsAsync(CancellationToken) ExistsAsync(CancellationToken)

public virtual Task<bool> ExistsAsync(CancellationToken cancellationToken = null)
Public Overridable Function ExistsAsync(cancellationToken As CancellationToken = Nothing) As Task(Of Boolean)
Parameters
cancellationToken
System.Threading.CancellationToken System.Threading.CancellationToken
Returns
System.Threading.Tasks.Task<System.Boolean> System.Threading.Tasks.Task(Of System.Boolean)

GetAppliedMigrations() GetAppliedMigrations()

public virtual IReadOnlyList<HistoryRow> GetAppliedMigrations()
Public Overridable Function GetAppliedMigrations As IReadOnlyList(Of HistoryRow)
Returns
System.Collections.Generic.IReadOnlyList<HistoryRow> System.Collections.Generic.IReadOnlyList(Of HistoryRow)

GetAppliedMigrationsAsync(CancellationToken) GetAppliedMigrationsAsync(CancellationToken)

public virtual Task<IReadOnlyList<HistoryRow>> GetAppliedMigrationsAsync(CancellationToken cancellationToken = null)
Public Overridable Function GetAppliedMigrationsAsync(cancellationToken As CancellationToken = Nothing) As Task(Of IReadOnlyList(Of HistoryRow))
Parameters
cancellationToken
System.Threading.CancellationToken System.Threading.CancellationToken
Returns
System.Threading.Tasks.Task<System.Collections.Generic.IReadOnlyList<HistoryRow>> System.Threading.Tasks.Task(Of System.Collections.Generic.IReadOnlyList(Of HistoryRow))

GetBeginIfExistsScript(String) GetBeginIfExistsScript(String)

public abstract string GetBeginIfExistsScript(string migrationId)
Public MustOverride Function GetBeginIfExistsScript(migrationId As String) As String
Parameters
migrationId
System.String System.String
Returns
System.String System.String

GetBeginIfNotExistsScript(String) GetBeginIfNotExistsScript(String)

public abstract string GetBeginIfNotExistsScript(string migrationId)
Public MustOverride Function GetBeginIfNotExistsScript(migrationId As String) As String
Parameters
migrationId
System.String System.String
Returns
System.String System.String

GetCreateIfNotExistsScript() GetCreateIfNotExistsScript()

public abstract string GetCreateIfNotExistsScript()
Public MustOverride Function GetCreateIfNotExistsScript As String
Returns
System.String System.String

GetCreateScript() GetCreateScript()

public virtual string GetCreateScript()
Public Overridable Function GetCreateScript As String
Returns
System.String System.String

GetDeleteScript(String) GetDeleteScript(String)

public virtual string GetDeleteScript(string migrationId)
Public Overridable Function GetDeleteScript(migrationId As String) As String
Parameters
migrationId
System.String System.String
Returns
System.String System.String

GetEndIfScript() GetEndIfScript()

public abstract string GetEndIfScript()
Public MustOverride Function GetEndIfScript As String
Returns
System.String System.String

GetHashCode() GetHashCode()

Inherited from System.Object

GetInsertScript(HistoryRow) GetInsertScript(HistoryRow)

public virtual string GetInsertScript(HistoryRow row)
Public Overridable Function GetInsertScript(row As HistoryRow) As String
Parameters
Returns
System.String System.String

GetType() GetType()

Inherited from System.Object

InterpretExistsResult(Object) InterpretExistsResult(Object)

protected abstract bool InterpretExistsResult(object value)
Protected MustOverride Function InterpretExistsResult(value As Object) As Boolean
Parameters
value
System.Object System.Object
Returns
System.Boolean System.Boolean

true if the table exists; otherwise, false.

MemberwiseClone() MemberwiseClone()

Inherited from System.Object

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

Inherited from System.Object

ToString() ToString()

Inherited from System.Object