public void Edit(Invoice entity) { _context.Invoices.Attach(entity); var entry = _context.Entry(entity); entry.State = EntityState.Modified; _context.SaveChanges(); }
public void Add(Invoice entity) { _context.Invoices.Add(entity); _context.SaveChanges(); }