Example #1
0
 public void NotifyMailModified(Mail mail)
 {
     if ((_context.Mails.Where(x => x.Id == mail.Id)).FirstOrDefault <Mail>() != null)
     {
         _context.Entry(mail).State = EntityState.Modified;
     }
     else
     {
         Add(mail);
         _context.Entry(mail).State = EntityState.Added;
     }
     SaveContext();
 }
 public void AddSendedReceiver(SendedReceiver item) //*
 {
     Add(item);
     _context.Entry(item).State = EntityState.Added;
 }
Example #3
0
 public void AddIPair(IPair item)
 {
     Add(item);
     _context.Entry(item).State = EntityState.Added;
     SaveContext();
 }