public Product Get(int productId) { try { if (productId < 1) { return(null); } return(productDal.Get(productId)); } catch (Exception) { return(null); } }
/// <summary> /// método lógica de negocio para eliminar un Producto /// </summary> /// <param name="Producto"></param> public static Product Get(Guid id) { OperationsLogs.WriteLogsDebug("ProductoBrl", "Obtener", string.Format("{0} Info: {1}", DateTime.Now.ToString(), "Empezando a ejecutar el método lógica de negocio para Obtener un Producto")); try { return(ProductDal.Get(id)); } catch (SqlException ex) { OperationsLogs.WriteLogsRelease("ProductoBrl", "Obtener", string.Format("{0} Error: {1}", DateTime.Now.ToString(), DateTime.Now.ToString(), ex.Message)); throw ex; } catch (Exception ex) { OperationsLogs.WriteLogsRelease("ProductoBrl", "Obtener", string.Format("{0} Error: {1}", DateTime.Now.ToString(), DateTime.Now.ToString(), ex.Message)); throw ex; } }