Exemple #1
0
        public Customer Delete(int customerId)
        {
            Customer cust = context.Customers.Find(customerId);

            if (cust != null)
            {
                context.Customers.Remove(cust);
                context.SaveChanges();
            }
            return(cust);
        }
 Bill IBillRepository.AddBill(Bill bill)
 {
     context.Bills.Add(bill);
     context.SaveChanges();
     return(bill);
 }
Exemple #3
0
 public OwnerDebt Add(OwnerDebt owner)
 {
     context.OwnerDebts.Add(owner);
     context.SaveChanges();
     return(owner);
 }
Exemple #4
0
 Product IProductRepository.Add(Product product)
 {
     context.Products.Add(product);
     context.SaveChanges();
     return(product);
 }