public void DeleteWorker(long id, IDbTransaction transaction) { const string Sql = @"DELETE FROM [BlueCollarWorking] WHERE [WorkerId] = @Id; DELETE FROM [BlueCollarHistory] WHERE [WorkerId] = @Id; DELETE FROM [BlueCollarWorker] WHERE [Id] = @Id;"; this.connection.Execute( Sql, new { Id = id }, transaction, null, null); }