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();
}