public ConsultaNotaSalidaAlmacenPlantaPorIdBE ConsultarNotaSalidaAlmacenPlantaPorId(ConsultaNotaSalidaAlmacenPlantaPorIdRequestDTO request) { ConsultaNotaSalidaAlmacenPlantaPorIdBE notaSalidaAlmacenPorIdBE = _INotaSalidaAlmacenPlantaRepository.ConsultarNotaSalidaAlmacenPlantaPorId(request.NotaSalidaAlmacenPlantaId); if (notaSalidaAlmacenPorIdBE != null) { notaSalidaAlmacenPorIdBE.Detalle = _INotaSalidaAlmacenPlantaRepository.ConsultarNotaSalidaAlmacenPlantaDetallePorIdBE(request.NotaSalidaAlmacenPlantaId); } return(notaSalidaAlmacenPorIdBE); }
public ConsultaNotaSalidaAlmacenPlantaPorIdBE ConsultarNotaSalidaAlmacenPlantaPorId(int notaSalidaAlmacenPlantaId) { ConsultaNotaSalidaAlmacenPlantaPorIdBE itemBE = null; var parameters = new DynamicParameters(); parameters.Add("NotaSalidaAlmacenPlantaId", notaSalidaAlmacenPlantaId); using (IDbConnection db = new SqlConnection(_connectionString.Value.CoffeeConnectDB)) { var list = db.Query <ConsultaNotaSalidaAlmacenPlantaPorIdBE>("uspNotaSalidaAlmacenPlantaObtenerPorId", parameters, commandType: CommandType.StoredProcedure); if (list.Any()) { itemBE = list.First(); } } return(itemBE); }