public GetWorkingSignals ( long workerId, long workingId, IDbTransaction transaction ) : |
||
workerId | long | The ID of the worker to get a signal for. |
workingId | long | The ID of the working job to get a signal for, if applicable. |
transaction | IDbTransaction | The transaction to use, if applicable. |
Результат |
public SignalsRecord GetWorkingSignals(long workerId, long? workingId, IDbTransaction transaction)
{
const string Sql =
@"SELECT w.[Signal] AS [WorkerSignal], w.[QueueNames], wg.[Signal] AS [WorkingSignal]
FROM [BlueCollarWorker] w
LEFT OUTER JOIN [BlueCollarWorking] wg ON w.[Id] = wg.[WorkerId] AND wg.[Id] = @WorkingId
WHERE
w.[Id] = @WorkerId;";
return this.connection.Query<SignalsRecord>(
Sql,
new
{
WorkerId = workerId,
WorkingId = workingId
},
transaction,
true,
null,
null).FirstOrDefault();
}