BlueCollar.SQLiteRepository.GetWorkers C# (CSharp) Метод

GetWorkers() публичный Метод

Gets the worker collection for the given machine.
public GetWorkers ( string applicationName, string machineAddress, string machineName, IDbTransaction transaction ) : IEnumerable
applicationName string The application name to get workers for.
machineAddress string The address of the machine to get workers for.
machineName string The name of the machine to get workers for.
transaction IDbTransaction The transaction to use, if applicable.
Результат IEnumerable
        public IEnumerable<WorkerRecord> GetWorkers(string applicationName, string machineAddress, string machineName, IDbTransaction transaction)
        {
            const string Sql =
            @"SELECT *
            FROM [BlueCollarWorker]
            WHERE
            [ApplicationName] = @ApplicationName
            AND ([MachineName] IS NULL OR [MachineName] = '' OR [MachineName] = @MachineName)
            AND ([MachineAddress] IS NULL OR [MachineAddress] = '' OR [MachineAddress] = @MachineAddress);";

            return this.connection.Query<WorkerRecord>(
                Sql,
                new { ApplicationName = applicationName, MachineName = machineName, MachineAddress = machineAddress },
                transaction,
                true,
                null,
                null);
        }