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