SqlServerTestStore SqlServerTestStore Class

Definition

public class SqlServerTestStore : RelationalTestStore, IDisposable
Public Class SqlServerTestStore
    Inherits RelationalTestStore
    Implements IDisposable
Inheritance
System.ObjectSystem.Object
SqlServerTestStoreSqlServerTestStore
Implements
System.IDisposableSystem.IDisposable

Fields

CommandTimeout CommandTimeout

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

Properties

Connection Connection

public override DbConnection Connection { get; }
Public Overrides ReadOnly Property Connection As DbConnection
Value
System.Data.Common.DbConnection System.Data.Common.DbConnection
Overrides

ConnectionString ConnectionString

public override string ConnectionString { get; }
Public Overrides ReadOnly Property ConnectionString As String
Value
System.String System.String
Overrides

Name Name

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

Transaction Transaction

public override DbTransaction Transaction { get; }
Public Overrides ReadOnly Property Transaction As DbTransaction
Value
System.Data.Common.DbTransaction System.Data.Common.DbTransaction
Overrides

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

CreateShared(String, Action) CreateShared(String, Action)

Inherited from TestStore

Dispose() Dispose()

public override void Dispose()
Public Overrides Sub Dispose
Overrides

Equals(Object) Equals(Object)

Inherited from System.Object

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

Inherited from System.Object

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<System.Int32> System.Threading.Tasks.Task(Of System.Int32)

ExecuteScalar(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
Type Parameters
T
Parameters
sql
System.String System.String
parameters
System.Object[] System.Object()
Returns
T T

ExecuteScalarAsync(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)
Type Parameters
T
Parameters
sql
System.String System.String
parameters
System.Object[] System.Object()
Returns
System.Threading.Tasks.Task<T> System.Threading.Tasks.Task(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

GetHashCode() GetHashCode()

Inherited from System.Object

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

GetType() GetType()

Inherited from System.Object

MemberwiseClone() MemberwiseClone()

Inherited from System.Object

OpenConnection() OpenConnection()

public override void OpenConnection()
Public Overrides Sub OpenConnection
Overrides

OpenConnectionAsync() OpenConnectionAsync()

public Task OpenConnectionAsync()
Public Function OpenConnectionAsync As Task
Returns
System.Threading.Tasks.Task System.Threading.Tasks.Task

Query(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)
Type Parameters
T
Parameters
sql
System.String System.String
parameters
System.Object[] System.Object()
Returns
System.Collections.Generic.IEnumerable<T> System.Collections.Generic.IEnumerable(Of T)

QueryAsync(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))
Type Parameters
T
Parameters
sql
System.String System.String
parameters
System.Object[] System.Object()
Returns
System.Threading.Tasks.Task<System.Collections.Generic.IEnumerable<T>> System.Threading.Tasks.Task(Of System.Collections.Generic.IEnumerable(Of T))

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

Inherited from System.Object

ToString() ToString()

Inherited from System.Object