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); }
public static int Execute(this ISqlStatement sqlStatement, string commandText, object parameters) { return(sqlStatement.Execute(commandText, parameters.AsDictionary())); }
public bool Commit() { return(_commit.Execute()); }
public bool RollBack() { return(_rollback.Execute()); }
public bool Begin() { return(_begin.Execute()); }