示例#1
0
 public void Add(T1[] list)
 {
     try
     {
         BaseLogic <T1> classInstance = CreateLogic();
         classInstance.Add(list);
     }
     catch (AggregateException e)
     {
         List <ValidationException> exceptions = e.InnerExceptions.Cast <ValidationException>().ToList();
         foreach (ValidationException err in exceptions)
         {
             ValidationFault fault = new ValidationFault();
             fault.Result      = false;
             fault.Message     = "Create Record Problem";
             fault.Description = err.Message;
             FaultException <ValidationFault> fe = new FaultException <ValidationFault>(fault, new FaultReason(fault.Message));
             throw fe;
         }
     }
 }