Esempio n. 1
0
 public List <Desk> GetAll()
 {
     using (BCafeContext bCafeEntities = new BCafeContext())
     {
         return(bCafeEntities.Desks.ToList());
     }
 }
Esempio n. 2
0
 public List <Staff> GetAll()
 {
     using (BCafeContext bCafeEntities = new BCafeContext())
     {
         return(bCafeEntities.Staffs.ToList());
     }
 }
Esempio n. 3
0
 public List <Receipt> GetAll()
 {
     using (BCafeContext bCafeEntities = new BCafeContext())
     {
         return(bCafeEntities.Receipts.ToList());
     }
 }
Esempio n. 4
0
 public List <Category> GetAll()
 {
     using (BCafeContext context = new BCafeContext())
     {
         return(context.Categories.ToList());
     }
 }
Esempio n. 5
0
 public List <Order> GetAll()
 {
     using (BCafeContext bCafeEntities = new BCafeContext())
     {
         return(bCafeEntities.Orders.ToList());
     }
 }
Esempio n. 6
0
 public List <Product> GetAll()
 {
     using (BCafeContext bCafeEntities = new BCafeContext())
     {
         return(bCafeEntities.Products.ToList());
     }
 }
Esempio n. 7
0
 public void Update(Desk entity)
 {
     using (BCafeContext bCafeEntities = new BCafeContext())
     {
         var result = bCafeEntities.Entry(entity);
         result.State = EntityState.Modified;
         bCafeEntities.SaveChanges();
     }
 }
Esempio n. 8
0
 public void Delete(Receipt entity)
 {
     using (BCafeContext bCafeEntities = new BCafeContext())
     {
         var result = bCafeEntities.Entry(entity);
         result.State = EntityState.Deleted;
         bCafeEntities.SaveChanges();
     }
 }
Esempio n. 9
0
 public void Add(Staff entity)
 {
     using (BCafeContext bCafeEntities = new BCafeContext())
     {
         var result = bCafeEntities.Entry(entity);
         result.State = EntityState.Added;
         bCafeEntities.SaveChanges();
     }
 }