feat:Se ajusta logica

This commit is contained in:
Leonel Toro 2025-07-22 10:17:30 -04:00
parent e83a41cd54
commit ed6475eab3
3 changed files with 29 additions and 8 deletions

View file

@ -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}");
}
}
}
}