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; }
public void AddIPair(IPair item) { Add(item); _context.Entry(item).State = EntityState.Added; SaveContext(); }