public DeleteWorker ( long id, IDbTransaction transaction ) : void | ||
id | long | The ID of the worker to delete. |
transaction | IDbTransaction | The transaction to use, if applicable. |
Résultat | void |
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);
}