SqlServerTestStore SqlServerTestStore Class

Syntax

Declaration

public class SqlServerTestStore : RelationalTestStore, IDisposablePublic Class SqlServerTestStore
    Inherits RelationalTestStore
    Implements IDisposable

Inheritance Hierarchy

Inherited Members

CreateShared(String, Action),
CreateShared(String, Action),
ToString(),
ToString(),
Equals(Object),
Equals(Object),
Equals(Object, Object),
Equals(Object, Object),
ReferenceEquals(Object, Object),
ReferenceEquals(Object, Object),
GetHashCode(),
GetHashCode(),
GetType(),
GetType(),
MemberwiseClone()
MemberwiseClone()

Fields summary

Properties summary

Methods summary

Fields

  • CommandTimeout
    CommandTimeout
    public const int CommandTimeout = 90Public Const CommandTimeout As Integer = 90

Properties

  • Connection
    Connection
    public override DbConnection Connection { get; }Public Overrides ReadOnly Property Connection As DbConnection

    Property Value

    • System.Data.Common.DbConnection
      System.Data.Common.DbConnection
  • ConnectionString
    ConnectionString
    public override string ConnectionString { get; }Public Overrides ReadOnly Property ConnectionString As String

    Property Value

    • System.String
      System.String
  • Name
    Name
    public string Name { get; }Public ReadOnly Property Name As String

    Property Value

    • System.String
      System.String
  • Transaction
    Transaction
    public override DbTransaction Transaction { get; }Public Overrides ReadOnly Property Transaction As DbTransaction

    Property Value

    • System.Data.Common.DbTransaction
      System.Data.Common.DbTransaction

Methods

  • Create(String)
    Create(String)
    public static SqlServerTestStore Create(string name)Public Shared Function Create(name As String) As SqlServerTestStore

    Parameters

    • name
      System.String
      System.String

    Returns

  • CreateConnectionString(String)
    CreateConnectionString(String)
    public static string CreateConnectionString(string name)Public Shared Function CreateConnectionString(name As String) As String

    Parameters

    • name
      System.String
      System.String

    Returns

    • System.String
      System.String
  • CreateConnectionString(String, String)
    CreateConnectionString(String, String)
    public static string CreateConnectionString(string name, string fileName)Public Shared Function CreateConnectionString(name As String, fileName As String) As String

    Parameters

    • name
      System.String
      System.String
    • fileName
      System.String
      System.String

    Returns

    • System.String
      System.String
  • CreateScratch(Boolean, Boolean)
    CreateScratch(Boolean, Boolean)
    public static SqlServerTestStore CreateScratch(bool createDatabase = true, bool useFileName = false)Public Shared Function CreateScratch(createDatabase As Boolean = True, useFileName As Boolean = False) As SqlServerTestStore

    Parameters

    • createDatabase
      System.Boolean
      System.Boolean
    • useFileName
      System.Boolean
      System.Boolean

    Returns

  • Dispose()
    Dispose()
    public override void Dispose()Public Overrides Sub Dispose
  • ExecuteNonQuery(String, Object[])
    ExecuteNonQuery(String, Object())
    public int ExecuteNonQuery(string sql, params object[] parameters)Public Function ExecuteNonQuery(sql As String, ParamArray parameters As Object()) As Integer

    Parameters

    • sql
      System.String
      System.String
    • parameters
      System.Object[]
      System.Object()

    Returns

    • System.Int32
      System.Int32
  • ExecuteNonQueryAsync(String, Object[])
    ExecuteNonQueryAsync(String, Object())
    public Task<int> ExecuteNonQueryAsync(string sql, params object[] parameters)Public Function ExecuteNonQueryAsync(sql As String, ParamArray parameters As Object()) As Task(Of Integer)

    Parameters

    • sql
      System.String
      System.String
    • parameters
      System.Object[]
      System.Object()

    Returns

    • System.Threading.Tasks.Task<TResult><System.Int32>
      System.Threading.Tasks.Task<TResult>(Of System.Int32)
  • ExecuteScalar<T>(String, Object[])
    ExecuteScalar(Of T)(String, Object())
    public T ExecuteScalar<T>(string sql, params object[] parameters)Public Function ExecuteScalar(Of T)(sql As String, ParamArray parameters As Object()) As T

    Parameters

    • sql
      System.String
      System.String
    • parameters
      System.Object[]
      System.Object()

    Returns

    • T
      T
  • ExecuteScalarAsync<T>(String, Object[])
    ExecuteScalarAsync(Of T)(String, Object())
    public Task<T> ExecuteScalarAsync<T>(string sql, params object[] parameters)Public Function ExecuteScalarAsync(Of T)(sql As String, ParamArray parameters As Object()) As Task(Of T)

    Parameters

    • sql
      System.String
      System.String
    • parameters
      System.Object[]
      System.Object()

    Returns

    • System.Threading.Tasks.Task<TResult><T>
      System.Threading.Tasks.Task<TResult>(Of T)
  • ExecuteScript(String, String)
    ExecuteScript(String, String)
    public static void ExecuteScript(string databaseName, string scriptPath)Public Shared Sub ExecuteScript(databaseName As String, scriptPath As String)

    Parameters

    • databaseName
      System.String
      System.String
    • scriptPath
      System.String
      System.String
  • GetExecutionStrategy()
    GetExecutionStrategy()
    public static IExecutionStrategy GetExecutionStrategy()Public Shared Function GetExecutionStrategy As IExecutionStrategy

    Returns

  • GetOrCreateShared(String, Action, Boolean)
    GetOrCreateShared(String, Action, Boolean)
    public static SqlServerTestStore GetOrCreateShared(string name, Action initializeDatabase, bool cleanDatabase = true)Public Shared Function GetOrCreateShared(name As String, initializeDatabase As Action, cleanDatabase As Boolean = True) As SqlServerTestStore

    Parameters

    • name
      System.String
      System.String
    • initializeDatabase
      System.Action
      System.Action
    • cleanDatabase
      System.Boolean
      System.Boolean

    Returns

  • OpenConnection()
    OpenConnection()
    public override void OpenConnection()Public Overrides Sub OpenConnection
  • OpenConnectionAsync()
    OpenConnectionAsync()
    public Task OpenConnectionAsync()Public Function OpenConnectionAsync As Task

    Returns

    • System.Threading.Tasks.Task
      System.Threading.Tasks.Task
  • Query<T>(String, Object[])
    Query(Of T)(String, Object())
    public IEnumerable<T> Query<T>(string sql, params object[] parameters)Public Function Query(Of T)(sql As String, ParamArray parameters As Object()) As IEnumerable(Of T)

    Parameters

    • sql
      System.String
      System.String
    • parameters
      System.Object[]
      System.Object()

    Returns

    • System.Collections.Generic.IEnumerable<T><T>
      System.Collections.Generic.IEnumerable<T>(Of T)
  • QueryAsync<T>(String, Object[])
    QueryAsync(Of T)(String, Object())
    public Task<IEnumerable<T>> QueryAsync<T>(string sql, params object[] parameters)Public Function QueryAsync(Of T)(sql As String, ParamArray parameters As Object()) As Task(Of IEnumerable(Of T))

    Parameters

    • sql
      System.String
      System.String
    • parameters
      System.Object[]
      System.Object()

    Returns

    • System.Threading.Tasks.Task<TResult><System.Collections.Generic.IEnumerable<T><T>>
      System.Threading.Tasks.Task<TResult>(Of System.Collections.Generic.IEnumerable<T>(Of T))

Details

Assembly

Microsoft.EntityFrameworkCore.SqlServer.FunctionalTests.dll