public void Delete(long id) { var invoice = Read(id); _context.Remove(invoice); _context.SaveChanges(); }
public StatusCodeResult Delete(int id) { var deletedInvoice = Read(id); _context.Remove(deletedInvoice); _context.SaveChanges(); return(new OkResult()); }