feat:Se ajusta logica
This commit is contained in:
parent
e83a41cd54
commit
ed6475eab3
3 changed files with 29 additions and 8 deletions
|
@ -40,5 +40,25 @@ namespace DAL
|
|||
}
|
||||
|
||||
}
|
||||
|
||||
public async Task<int> ObtenerTotalMediciones(DateTime fechaInicio)
|
||||
{
|
||||
try
|
||||
{
|
||||
var parameters = new DynamicParameters();
|
||||
parameters.Add("@FechaInicio", fechaInicio);
|
||||
using var connection = new SqlConnection(BdConexion.StringConnection);
|
||||
var resultado = await connection.QuerySingleAsync<int>(
|
||||
"SP_OBTENER_TOTAL_MEDICIONES",
|
||||
parameters,
|
||||
commandType: CommandType.StoredProcedure);
|
||||
|
||||
return resultado;
|
||||
}
|
||||
catch(Exception ex)
|
||||
{
|
||||
throw new Exception($"ERROR {ex.Message}");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue