Пример #1
0
 public void CreateInvoice(Invoice invoice)
 {
     using (var db = new OskarEntities())
     {
         db.Invoices.Add(invoice);
         db.SaveChanges();
     }
 }
Пример #2
0
 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();
     }
 }
Пример #3
0
 public void UpdateInvoice(Invoice invoice)
 {
     throw new NotImplementedException();
 }