public static List <SpecialInvent> GetAllSpecialInvent() { using (restaurantEntities db = new restaurantEntities()) { return(db.SpecialInvent.ToList()); } }
//get all public static List <Rating> GetAll() { using (restaurantEntities db = new restaurantEntities()) { return(db.Rating.ToList()); } }
//get by id public static Visiters GetById(int id) { using (restaurantEntities db = new restaurantEntities()) { return(db.Visiters.FirstOrDefault(v => v.ld == id)); } }
//get all public static List <InventDose> GetAll() { using (restaurantEntities db = new restaurantEntities()) { return(db.InventDose.ToList()); } }
//get all public static List <Visiters> GetAll() { using (restaurantEntities db = new restaurantEntities()) { return(db.Visiters.ToList()); } }
public static Visiters GetByPassword(string username, string password) { using (restaurantEntities db = new restaurantEntities()) { return(db.Visiters.FirstOrDefault(p => p.Password == password && p.NameUser == username)); } }
//get all public static List <EmployeesTypes> GetAll() { using (restaurantEntities db = new restaurantEntities()) { return(db.EmployeesTypes.ToList()); } }
//get by id public static EmployeesTypes GetById(int id) { using (restaurantEntities db = new restaurantEntities()) { return(db.EmployeesTypes.Find(id)); } }
public static StatusInvent GetByIdStatusInvent(int id) { using (restaurantEntities db = new restaurantEntities()) { return(db.StatusInvent.Find(id)); } }
//get by category public static List <Menu> GetByCategory(int id) { using (restaurantEntities db = new restaurantEntities()) { return(db.Menu.Where(item => item.Category == id).ToList()); } }
//get by id public static Menu GetById(int id) { using (restaurantEntities db = new restaurantEntities()) { return(db.Menu.Find(id)); } }
//get by id public static Rating GetById(int id) { using (restaurantEntities db = new restaurantEntities()) { return(db.Rating.Find(id)); } }
//get all public static List <Tables> GetAll() { using (restaurantEntities db = new restaurantEntities()) { return(db.Tables.ToList()); } }
public static Employees Login(string username, string password) { using (restaurantEntities db = new restaurantEntities()) { return(db.Employees.FirstOrDefault(p => p.Password == password && p.LastName == username)); } }
//get all public static List <Category> GetAll() { using (restaurantEntities db = new restaurantEntities()) { return(db.Category.ToList()); } }
//get by id public static Category GetById(int id) { using (restaurantEntities db = new restaurantEntities()) { return(db.Category.Find(id)); } }
//get all public static List <CommentVisiter> GetAll() { using (restaurantEntities db = new restaurantEntities()) { return(db.CommentVisiter.ToList()); } }
//get by id public static CurrentEmployee GetById(int id) { using (restaurantEntities db = new restaurantEntities()) { return(db.CurrentEmployee.Find(id)); } }
//get by id public static Tables GetById(int id) { using (restaurantEntities db = new restaurantEntities()) { return(db.Tables.Find(id)); } }
//get all public static List <CurrentEmployee> GetAll() { using (restaurantEntities db = new restaurantEntities()) { return(db.CurrentEmployee.ToList()); } }
//get all public static List <Menu> GetAll() { using (restaurantEntities db = new restaurantEntities()) { return(db.Menu.ToList()); } }
//add public static void Add(Category Category) { using (restaurantEntities db = new restaurantEntities()) { db.Category.Add(Category); db.SaveChanges(); } }
// get by id // public static CommentVisiter GetById(int id) // { // using (restaurantEntities db = new restaurantEntities()) // { // return db.CommentVisiter.Find(id); // } // } // add public static void Add(CommentVisiter CommentVisiter) { using (restaurantEntities db = new restaurantEntities()) { db.CommentVisiter.Add(CommentVisiter); db.SaveChanges(); } }
//delete public static void Delete(CurrentEmployee currentEmployee) { using (restaurantEntities db = new restaurantEntities()) { db.CurrentEmployee.Remove(currentEmployee); db.SaveChanges(); } }
//update public static void Update(CurrentEmployee currentEmployee) { using (restaurantEntities db = new restaurantEntities()) { db.Entry(currentEmployee).State = EntityState.Modified; db.SaveChanges(); } }
//add public static void Add(CurrentEmployee currentEmployee) { using (restaurantEntities db = new restaurantEntities()) { db.CurrentEmployee.Add(currentEmployee); db.SaveChanges(); } }
//delete public static void Delete(Tables tables) { using (restaurantEntities db = new restaurantEntities()) { db.Tables.Remove(tables); db.SaveChanges(); } }
//update public static void Update(Tables tables) { using (restaurantEntities db = new restaurantEntities()) { db.Entry(tables).State = EntityState.Modified; db.SaveChanges(); } }
//add public static void Add(Tables tables) { using (restaurantEntities db = new restaurantEntities()) { db.Tables.Add(tables); db.SaveChanges(); } }
//delete public static void Delete(Rating Rating) { using (restaurantEntities db = new restaurantEntities()) { db.Rating.Remove(Rating); db.SaveChanges(); } }