BlueCollar.SQLiteRepository.GetHistoryDetails C# (CSharp) Method

GetHistoryDetails() public method

Gets a history details record.
public GetHistoryDetails ( long id, IDbTransaction transaction ) : HistoryDetailsRecord
id long The ID of the record to get.
transaction IDbTransaction The transaction to use, if applicable.
return HistoryDetailsRecord
        public HistoryDetailsRecord GetHistoryDetails(long id, IDbTransaction transaction)
        {
            const string Sql =
            @"SELECT
            h.[Id],
            h.[Data],
            h.[Exception],
            h.[QueuedOn],
            w.[MachineAddress] AS [WorkerMachineAddress],
            w.[MachineName] AS [WorkerMachineName],
            w.[Name] AS [WorkerName]
            FROM [BlueCollarHistory] h
            INNER JOIN [BlueCollarWorker] w ON h.[WorkerId] = w.[Id]
            WHERE
            h.[Id] = @Id;";

            return this.connection.Query<HistoryDetailsRecord>(
                Sql,
                new { Id = id },
                transaction,
                true,
                null,
                null).FirstOrDefault();
        }