public ConsultaAnticipoPorIdBE ConsultarAnticipoPorId(ConsultaAnticipoPorIdRequestDTO request) { ConsultaAnticipoPorIdBE consultaAnticipoPorIdBE = _IAnticipoRepository.ConsultarAnticipoPorId(request.AnticipoId); return(consultaAnticipoPorIdBE); }
public ConsultaAnticipoPorIdBE ConsultarAnticipoPorId(int anticipoId) { ConsultaAnticipoPorIdBE itemBE = null; var parameters = new DynamicParameters(); parameters.Add("@AnticipoId", anticipoId); using (IDbConnection db = new SqlConnection(_connectionString.Value.CoffeeConnectDB)) { var list = db.Query <ConsultaAnticipoPorIdBE>("uspAnticipoConsultaPorId", parameters, commandType: CommandType.StoredProcedure); if (list.Any()) { itemBE = list.First(); } } return(itemBE); }