Пример #1
0
 public static List <SpecialInvent> GetAllSpecialInvent()
 {
     using (restaurantEntities db = new restaurantEntities())
     {
         return(db.SpecialInvent.ToList());
     }
 }
Пример #2
0
 //get all
 public static List <Rating> GetAll()
 {
     using (restaurantEntities db = new restaurantEntities())
     {
         return(db.Rating.ToList());
     }
 }
Пример #3
0
 //get by id
 public static Visiters GetById(int id)
 {
     using (restaurantEntities db = new restaurantEntities())
     {
         return(db.Visiters.FirstOrDefault(v => v.ld == id));
     }
 }
Пример #4
0
 //get all
 public static List <InventDose> GetAll()
 {
     using (restaurantEntities db = new restaurantEntities())
     {
         return(db.InventDose.ToList());
     }
 }
Пример #5
0
 //get all
 public static List <Visiters> GetAll()
 {
     using (restaurantEntities db = new restaurantEntities())
     {
         return(db.Visiters.ToList());
     }
 }
Пример #6
0
 public static Visiters GetByPassword(string username, string password)
 {
     using (restaurantEntities db = new restaurantEntities())
     {
         return(db.Visiters.FirstOrDefault(p => p.Password == password && p.NameUser == username));
     }
 }
Пример #7
0
 //get all
 public static List <EmployeesTypes> GetAll()
 {
     using (restaurantEntities db = new restaurantEntities())
     {
         return(db.EmployeesTypes.ToList());
     }
 }
Пример #8
0
 //get by id
 public static EmployeesTypes GetById(int id)
 {
     using (restaurantEntities db = new restaurantEntities())
     {
         return(db.EmployeesTypes.Find(id));
     }
 }
Пример #9
0
 public static StatusInvent GetByIdStatusInvent(int id)
 {
     using (restaurantEntities db = new restaurantEntities())
     {
         return(db.StatusInvent.Find(id));
     }
 }
Пример #10
0
 //get by category
 public static List <Menu> GetByCategory(int id)
 {
     using (restaurantEntities db = new restaurantEntities())
     {
         return(db.Menu.Where(item => item.Category == id).ToList());
     }
 }
Пример #11
0
 //get by id
 public static Menu GetById(int id)
 {
     using (restaurantEntities db = new restaurantEntities())
     {
         return(db.Menu.Find(id));
     }
 }
Пример #12
0
 //get by id
 public static Rating GetById(int id)
 {
     using (restaurantEntities db = new restaurantEntities())
     {
         return(db.Rating.Find(id));
     }
 }
Пример #13
0
 //get all
 public static List <Tables> GetAll()
 {
     using (restaurantEntities db = new restaurantEntities())
     {
         return(db.Tables.ToList());
     }
 }
Пример #14
0
 public static Employees Login(string username, string password)
 {
     using (restaurantEntities db = new restaurantEntities())
     {
         return(db.Employees.FirstOrDefault(p => p.Password == password && p.LastName == username));
     }
 }
Пример #15
0
 //get all
 public static List <Category> GetAll()
 {
     using (restaurantEntities db = new restaurantEntities())
     {
         return(db.Category.ToList());
     }
 }
Пример #16
0
 //get by id
 public static Category GetById(int id)
 {
     using (restaurantEntities db = new restaurantEntities())
     {
         return(db.Category.Find(id));
     }
 }
Пример #17
0
 //get all
 public static List <CommentVisiter> GetAll()
 {
     using (restaurantEntities db = new restaurantEntities())
     {
         return(db.CommentVisiter.ToList());
     }
 }
Пример #18
0
 //get by id
 public static CurrentEmployee GetById(int id)
 {
     using (restaurantEntities db = new restaurantEntities())
     {
         return(db.CurrentEmployee.Find(id));
     }
 }
Пример #19
0
 //get by id
 public static Tables GetById(int id)
 {
     using (restaurantEntities db = new restaurantEntities())
     {
         return(db.Tables.Find(id));
     }
 }
Пример #20
0
 //get all
 public static List <CurrentEmployee> GetAll()
 {
     using (restaurantEntities db = new restaurantEntities())
     {
         return(db.CurrentEmployee.ToList());
     }
 }
Пример #21
0
 //get all
 public static List <Menu> GetAll()
 {
     using (restaurantEntities db = new restaurantEntities())
     {
         return(db.Menu.ToList());
     }
 }
Пример #22
0
 //add
 public static void Add(Category Category)
 {
     using (restaurantEntities db = new restaurantEntities())
     {
         db.Category.Add(Category);
         db.SaveChanges();
     }
 }
Пример #23
0
        //    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();
            }
        }
Пример #24
0
 //delete
 public static void Delete(CurrentEmployee currentEmployee)
 {
     using (restaurantEntities db = new restaurantEntities())
     {
         db.CurrentEmployee.Remove(currentEmployee);
         db.SaveChanges();
     }
 }
Пример #25
0
 //update
 public static void Update(CurrentEmployee currentEmployee)
 {
     using (restaurantEntities db = new restaurantEntities())
     {
         db.Entry(currentEmployee).State = EntityState.Modified;
         db.SaveChanges();
     }
 }
Пример #26
0
 //add
 public static void Add(CurrentEmployee currentEmployee)
 {
     using (restaurantEntities db = new restaurantEntities())
     {
         db.CurrentEmployee.Add(currentEmployee);
         db.SaveChanges();
     }
 }
Пример #27
0
 //delete
 public static void Delete(Tables tables)
 {
     using (restaurantEntities db = new restaurantEntities())
     {
         db.Tables.Remove(tables);
         db.SaveChanges();
     }
 }
Пример #28
0
 //update
 public static void Update(Tables tables)
 {
     using (restaurantEntities db = new restaurantEntities())
     {
         db.Entry(tables).State = EntityState.Modified;
         db.SaveChanges();
     }
 }
Пример #29
0
 //add
 public static void Add(Tables tables)
 {
     using (restaurantEntities db = new restaurantEntities())
     {
         db.Tables.Add(tables);
         db.SaveChanges();
     }
 }
Пример #30
0
 //delete
 public static void Delete(Rating Rating)
 {
     using (restaurantEntities db = new restaurantEntities())
     {
         db.Rating.Remove(Rating);
         db.SaveChanges();
     }
 }