public UpdateWorkerStatus ( long id, WorkerStatus status, IDbTransaction transaction ) : void | ||
id | long | The ID of the worker to update status for. |
status | WorkerStatus | The status to update. |
transaction | IDbTransaction | The transaction to use, if applicable. |
Résultat | void |
public void UpdateWorkerStatus(long id, WorkerStatus status, IDbTransaction transaction)
{
const string Sql =
@"UPDATE [BlueCollarWorker]
SET
[Status] = @Status,
[UpdatedOn] = @Now
WHERE
[Id] = @Id;";
this.connection.Execute(
Sql,
new
{
Id = id,
Now = DateTime.UtcNow,
Status = status.ToString()
},
transaction,
null,
null);
}