FakeDbConnection FakeDbConnection Class

Syntax

Declaration

public class FakeDbConnection : DbConnection, IDbConnection, IDisposablePublic Class FakeDbConnection
    Inherits DbConnection
    Implements IDbConnection, IDisposable

Inheritance Hierarchy

  • System.Object
    System.Object
  • System.Data.Common.DbConnection
    System.Data.Common.DbConnection
  • FakeDbConnection
    FakeDbConnection

Inherited Members

BeginTransaction(),
BeginTransaction(),
BeginTransaction(IsolationLevel),
BeginTransaction(IsolationLevel),
IDbConnection.BeginTransaction(),
System.Data.IDbConnection.BeginTransaction(),
IDbConnection.BeginTransaction(IsolationLevel),
System.Data.IDbConnection.BeginTransaction(IsolationLevel),
CreateCommand(),
CreateCommand(),
IDbConnection.CreateCommand(),
System.Data.IDbConnection.CreateCommand(),
EnlistTransaction(Transaction),
EnlistTransaction(Transaction),
GetSchema(),
GetSchema(),
GetSchema(String),
GetSchema(String),
GetSchema(String, String[]),
GetSchema(String, String()),
OnStateChange(StateChangeEventArgs),
OnStateChange(StateChangeEventArgs),
OpenAsync(),
OpenAsync(),
ConnectionTimeout,
ConnectionTimeout,
DbProviderFactory,
DbProviderFactory,
StateChange
StateChange

Constructors summary

Properties summary

Methods summary

Constructors

  • FakeDbConnection(String, FakeCommandExecutor, ConnectionState)
    FakeDbConnection(String, FakeCommandExecutor, ConnectionState)
    public FakeDbConnection(string connectionString, FakeCommandExecutor commandExecutor = null, ConnectionState state = ConnectionState.Closed)Public Sub New(connectionString As String, commandExecutor As FakeCommandExecutor = Nothing, state As ConnectionState = ConnectionState.Closed)

    Parameters

Properties

  • ActiveTransaction
    ActiveTransaction
    public FakeDbTransaction ActiveTransaction { get; set; }Public Property ActiveTransaction As FakeDbTransaction

    Property Value

  • CloseCount
    CloseCount
    public int CloseCount { get; }Public ReadOnly Property CloseCount As Integer

    Property Value

    • System.Int32
      System.Int32
  • ConnectionString
    ConnectionString
    public override string ConnectionString { get; set; }Public Overrides Property ConnectionString As String

    Property Value

    • System.String
      System.String
  • Database
    Database
    public override string Database { get; }Public Overrides ReadOnly Property Database As String

    Property Value

    • System.String
      System.String
  • DataSource
    DataSource
    public override string DataSource { get; }Public Overrides ReadOnly Property DataSource As String

    Property Value

    • System.String
      System.String
  • DbCommands
    DbCommands
    public IReadOnlyList<FakeDbCommand> DbCommands { get; }Public ReadOnly Property DbCommands As IReadOnlyList(Of FakeDbCommand)

    Property Value

  • DbTransactions
    DbTransactions
    public IReadOnlyList<FakeDbTransaction> DbTransactions { get; }Public ReadOnly Property DbTransactions As IReadOnlyList(Of FakeDbTransaction)

    Property Value

  • DisposeCount
    DisposeCount
    public int DisposeCount { get; }Public ReadOnly Property DisposeCount As Integer

    Property Value

    • System.Int32
      System.Int32
  • OpenAsyncCount
    OpenAsyncCount
    public int OpenAsyncCount { get; }Public ReadOnly Property OpenAsyncCount As Integer

    Property Value

    • System.Int32
      System.Int32
  • OpenCount
    OpenCount
    public int OpenCount { get; }Public ReadOnly Property OpenCount As Integer

    Property Value

    • System.Int32
      System.Int32
  • ServerVersion
    ServerVersion
    public override string ServerVersion { get; }Public Overrides ReadOnly Property ServerVersion As String

    Property Value

    • System.String
      System.String
  • State
    State
    public override ConnectionState State { get; }Public Overrides ReadOnly Property State As ConnectionState

    Property Value

    • System.Data.ConnectionState
      System.Data.ConnectionState

Methods

  • BeginDbTransaction(IsolationLevel)
    BeginDbTransaction(IsolationLevel)
    protected override DbTransaction BeginDbTransaction(IsolationLevel isolationLevel)Protected Overrides Function BeginDbTransaction(isolationLevel As IsolationLevel) As DbTransaction

    Parameters

    • isolationLevel
      System.Data.IsolationLevel
      System.Data.IsolationLevel

    Returns

    • System.Data.Common.DbTransaction
      System.Data.Common.DbTransaction
  • ChangeDatabase(String)
    ChangeDatabase(String)
    public override void ChangeDatabase(string databaseName)Public Overrides Sub ChangeDatabase(databaseName As String)

    Parameters

    • databaseName
      System.String
      System.String
  • Close()
    Close()
    public override void Close()Public Overrides Sub Close
  • CreateDbCommand()
    CreateDbCommand()
    protected override DbCommand CreateDbCommand()Protected Overrides Function CreateDbCommand As DbCommand

    Returns

    • System.Data.Common.DbCommand
      System.Data.Common.DbCommand
  • Dispose(Boolean)
    Dispose(Boolean)
    protected override void Dispose(bool disposing)Protected Overrides Sub Dispose(disposing As Boolean)

    Parameters

    • disposing
      System.Boolean
      System.Boolean
  • Open()
    Open()
    public override void Open()Public Overrides Sub Open
  • OpenAsync(CancellationToken)
    OpenAsync(CancellationToken)
    public override Task OpenAsync(CancellationToken cancellationToken)Public Overrides Function OpenAsync(cancellationToken As CancellationToken) As Task

    Parameters

    • cancellationToken
      System.Threading.CancellationToken
      System.Threading.CancellationToken

    Returns

    • System.Threading.Tasks.Task
      System.Threading.Tasks.Task
  • SetState(ConnectionState)
    SetState(ConnectionState)
    public void SetState(ConnectionState state)Public Sub SetState(state As ConnectionState)

    Parameters

    • state
      System.Data.ConnectionState
      System.Data.ConnectionState

Details

Assembly

Microsoft.EntityFrameworkCore.Relational.Tests.dll