예제 #1
0
 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;
     }
 }
예제 #2
0
 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;
     }
 }