/// <summary>
 ///     Initializes a new instance of the <see cref="FakeCommand" /> class.
 /// </summary>
 /// <param name="fakeConnection">The fake db connection.</param>
 /// <param name="results">Results for every command execution that this command will get.</param>
 public FakeCommand(FakeConnection fakeConnection, IEnumerable<CommandResult> results)
 {
     _connection = fakeConnection;
     _parameters = Factory.Instance.CreateParameterCollection(this);
     _inCommands.AddRange(results);
 }
 /// <summary>
 ///     Initializes a new instance of the <see cref="FakeCommand" /> class.
 /// </summary>
 /// <param name="fakeConnection">The fake db connection.</param>
 public FakeCommand(FakeConnection fakeConnection)
 {
     _connection = fakeConnection;
     _parameters = Factory.Instance.CreateParameterCollection(this);
 }
예제 #3
0
 /// <summary>
 /// Creates the transaction.
 /// </summary>
 /// <param name="connection">The connection which wants to create a transaction.</param>
 /// <param name="il">Isolation level.</param>
 /// <returns>The transaction</returns>
 public virtual FakeTransaction CreateTransaction(FakeConnection connection, IsolationLevel il)
 {
     return(new FakeTransaction(connection, il));
 }
예제 #4
0
 /// <summary>
 /// Create a new command
 /// </summary>
 /// <param name="connection">The connection that want to return a new command.</param>
 /// <returns>Created command</returns>
 public virtual FakeCommand CreateCommand(FakeConnection connection)
 {
     return(new FakeCommand(connection));
 }
예제 #5
0
 /// <summary>
 /// Create a new transaction
 /// </summary>
 /// <param name="connection">Connection which wants to create a transaction</param>
 /// <returns>The transaction</returns>
 public virtual FakeTransaction CreateTransaction(FakeConnection connection)
 {
     return(new FakeTransaction(connection));
 }