public void Update(ActiveUp.Net.Mail.DeltaExt.MailUser u, ActiveUp.Net.Mail.Message m) { using (var dbcontext = new FAXPECContext()) { try { MAIL_INBOX inbox = dbcontext.MAIL_INBOX.Where(x => x.ID_MAIL == int.Parse(m.Uid) && x.MAIL_ACCOUNT.ToUpper() == u.EmailAddress.ToUpper()).First(); inbox = DaoSQLServerDBHelper.MapToMailInBox(u, m); dbcontext.SaveChanges(); } catch (Exception e) { if (!e.GetType().Equals(typeof(ManagedException))) { ManagedException mEx = new ManagedException("Errore nel metodo Update(ActiveUp.Net.Mail.DeltaExt.MailUser u, ActiveUp.Net.Mail.Message m) Dettaglio: " + e.Message, "E015", string.Empty, string.Empty, e.InnerException); ErrorLogInfo err = new ErrorLogInfo(mEx); _log.Error(err); } } } }