public void CreateInvoice(Invoice invoice) { using (var db = new OskarEntities()) { db.Invoices.Add(invoice); db.SaveChanges(); } }
public void DeleteInvoice(int invoiceId) { using (var db = new OskarEntities()) { var invoice = new Invoice { InvoiceId = invoiceId }; db.Invoices.Attach(invoice); db.Invoices.Remove(invoice); db.SaveChanges(); } }
public void UpdateInvoice(Invoice invoice) { throw new NotImplementedException(); }