示例#1
0
 /// <summary>
 ///
 /// </summary>
 /// <param name="entity"></param>
 public void Insert(Model.MailRefs entity)
 {
     try
     {
         using (FAXPECContext dbcontext = new FAXPECContext())
         {
             MAIL_REFS_NEW refs = AutoMapperConfiguration.FromMailRefsNewToDto(entity);
             dbcontext.MAIL_REFS_NEW.Add(refs);
             dbcontext.SaveChanges();
         }
     }
     catch (Exception ex)
     {
         //Allineamento log - Ciro
         if (ex.GetType() != typeof(ManagedException))
         {
             ManagedException mEx = new ManagedException(ex.Message, "ERR_INS001", string.Empty, string.Empty, ex);
             ErrorLogInfo     er  = new ErrorLogInfo(mEx);
             er.objectID = entity.IdRef.ToString();
             log.Error(er);
             throw mEx;
         }
         else
         {
             throw ex;
         }
     }
 }
示例#2
0
 public void Update(Model.MailRefs entity)
 {
     throw new NotImplementedException();
 }