public ConsultaNotaIngresoAlmacenPlantaPorIdBE ConsultarNotaIngresoAlmacenPlantaPorId(ConsultaNotaIngresoAlmacenPlantaPorIdRequestDTO request) { ConsultaNotaIngresoAlmacenPlantaPorIdBE consultaNotaIngresoAlmacenPlantaPorIdBE = _INotaIngresoAlmacenPlantaRepository.ConsultarNotaIngresoAlmacenPlantaPorId(request.NotaIngresoAlmacenPlantaId); return(consultaNotaIngresoAlmacenPlantaPorIdBE); }
public ConsultaNotaIngresoAlmacenPlantaPorIdBE ConsultarNotaIngresoAlmacenPlantaPorId(int NotaIngresoAlmacenPlantaId) { ConsultaNotaIngresoAlmacenPlantaPorIdBE itemBE = null; var parameters = new DynamicParameters(); parameters.Add("@NotaIngresoAlmacenIdPlanta", NotaIngresoAlmacenPlantaId); using (IDbConnection db = new SqlConnection(_connectionString.Value.CoffeeConnectDB)) { var list = db.Query <ConsultaNotaIngresoAlmacenPlantaPorIdBE>("uspNotaIngresoAlmacenPlantaObtenerPorId", parameters, commandType: CommandType.StoredProcedure); if (list.Any()) { itemBE = list.First(); } } return(itemBE); }