public int InsertFromInfo(AlimentoEntityInfo EntityInfo) { try { AlimentoEntityInsert EntityInsert = new AlimentoEntityInsert(); EntityInsert.LoadFromInfo(EntityInfo); return(this.Insert_Return_Scalar(EntityInsert)); } catch (Exception ex) { Helpers.Logger.Logger.LogExceptionStatic(ex); throw ex; } }
public int Insert_Return_Scalar(AlimentoEntityInsert EntityInsert) { try { if (!EntityInsert.Validate()) { throw new Exception(EntityInsert.ErroresQueInvalidanLaEntidad); } return(this.CreateDataAccess().Insert_Return_Scalar(EntityInsert)); } catch (Exception ex) { Helpers.Logger.Logger.LogExceptionStatic(ex); throw ex; } }