Пример #1
0
        public InvoiceHeader Delete(int id)
        {
            InvoiceHeader invoiceHeader = context.InvoiceHeader.Find(id);

            if (invoiceHeader != null)
            {
                context.InvoiceHeader.Remove(invoiceHeader);
                context.SaveChanges();
            }
            return(invoiceHeader);
        }
Пример #2
0
 public InvoiceHeader Add(InvoiceHeader InvoiceHeader)
 {
     context.InvoiceHeader.Add(InvoiceHeader);
     context.SaveChanges();
     return(InvoiceHeader);
 }