cambios
This commit is contained in:
parent
e5341cfcff
commit
d228cf71dd
3 changed files with 7 additions and 19 deletions
|
@ -8,27 +8,16 @@ namespace DAL
|
|||
{
|
||||
public class MedicionDGARepository
|
||||
{
|
||||
public async Task<List<DatoDGA>> ObtenerMedicionesAsync()
|
||||
public async Task<List<DatoDGATemporal>> ObtenerMedicionesPorLoteAsync(int pageNumber, DateTime fecha)
|
||||
{
|
||||
await using var connection = new SqlConnection(BdConexion.StringConnection);
|
||||
|
||||
var result = await connection.QueryAsync<DatoDGA>(
|
||||
"SP_OBTENER_DGA_DATOS",
|
||||
commandType: CommandType.StoredProcedure);
|
||||
|
||||
return result.ToList();
|
||||
}
|
||||
|
||||
public async Task<List<DatoDGATemporal>> ObtenerMedicionesPorLoteAsync(int pageNumber)
|
||||
{
|
||||
var nroPagina = new DynamicParameters();
|
||||
nroPagina.Add("@PageNumber", pageNumber);
|
||||
|
||||
var parameters = new DynamicParameters();
|
||||
parameters.Add("@PageNumber", pageNumber);
|
||||
parameters.Add("@FechaInicio", fecha);
|
||||
await using var connection = new SqlConnection(BdConexion.StringConnection);
|
||||
|
||||
var resultado = await connection.QueryAsync<DatoDGATemporal>(
|
||||
"SP_OBTENER_LOTE_DGA_DATOS",
|
||||
nroPagina,
|
||||
parameters,
|
||||
commandType: CommandType.StoredProcedure);
|
||||
|
||||
return resultado.ToList();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue