Пример #1
0
        public void should_execute_non_query(
            [Values(FirstBatch, "")] string firstBatch)
        {
            SqlStatement.Execute($"DELETE FROM {Database.FirstTable.Name} WHERE Id=@Id", new { Id = 6 }).ShouldEqual(1);

            var result = SqlStatement.ExecuteScalar <int>($"{firstBatch}SELECT COUNT(*) FROM {Database.FirstTable.Name}");

            result.ShouldEqual(9);
        }
Пример #2
0
 public static int Execute(this ISqlStatement sqlStatement,
                           string commandText, object parameters)
 {
     return(sqlStatement.Execute(commandText, parameters.AsDictionary()));
 }
Пример #3
0
 public bool Commit()
 {
     return(_commit.Execute());
 }
Пример #4
0
 public bool RollBack()
 {
     return(_rollback.Execute());
 }
Пример #5
0
 public bool Begin()
 {
     return(_begin.Execute());
 }