public List <Desk> GetAll() { using (BCafeContext bCafeEntities = new BCafeContext()) { return(bCafeEntities.Desks.ToList()); } }
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()); } }
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(); } }
public void Add(Staff entity) { using (BCafeContext bCafeEntities = new BCafeContext()) { var result = bCafeEntities.Entry(entity); result.State = EntityState.Added; bCafeEntities.SaveChanges(); } }