Ejemplo n.º 1
0
 public static List <SpecialInvent> GetAllSpecialInvent()
 {
     using (restaurantEntities db = new restaurantEntities())
     {
         return(db.SpecialInvent.ToList());
     }
 }
Ejemplo n.º 2
0
 //get all
 public static List <Rating> GetAll()
 {
     using (restaurantEntities db = new restaurantEntities())
     {
         return(db.Rating.ToList());
     }
 }
Ejemplo n.º 3
0
 //get by id
 public static Visiters GetById(int id)
 {
     using (restaurantEntities db = new restaurantEntities())
     {
         return(db.Visiters.FirstOrDefault(v => v.ld == id));
     }
 }
Ejemplo n.º 4
0
 //get all
 public static List <InventDose> GetAll()
 {
     using (restaurantEntities db = new restaurantEntities())
     {
         return(db.InventDose.ToList());
     }
 }
Ejemplo n.º 5
0
 //get all
 public static List <Visiters> GetAll()
 {
     using (restaurantEntities db = new restaurantEntities())
     {
         return(db.Visiters.ToList());
     }
 }
Ejemplo n.º 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));
     }
 }
Ejemplo n.º 7
0
 //get all
 public static List <EmployeesTypes> GetAll()
 {
     using (restaurantEntities db = new restaurantEntities())
     {
         return(db.EmployeesTypes.ToList());
     }
 }
Ejemplo n.º 8
0
 //get by id
 public static EmployeesTypes GetById(int id)
 {
     using (restaurantEntities db = new restaurantEntities())
     {
         return(db.EmployeesTypes.Find(id));
     }
 }
Ejemplo n.º 9
0
 public static StatusInvent GetByIdStatusInvent(int id)
 {
     using (restaurantEntities db = new restaurantEntities())
     {
         return(db.StatusInvent.Find(id));
     }
 }
Ejemplo n.º 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());
     }
 }
Ejemplo n.º 11
0
 //get by id
 public static Menu GetById(int id)
 {
     using (restaurantEntities db = new restaurantEntities())
     {
         return(db.Menu.Find(id));
     }
 }
Ejemplo n.º 12
0
 //get by id
 public static Rating GetById(int id)
 {
     using (restaurantEntities db = new restaurantEntities())
     {
         return(db.Rating.Find(id));
     }
 }
Ejemplo n.º 13
0
 //get all
 public static List <Tables> GetAll()
 {
     using (restaurantEntities db = new restaurantEntities())
     {
         return(db.Tables.ToList());
     }
 }
Ejemplo n.º 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));
     }
 }
Ejemplo n.º 15
0
 //get all
 public static List <Category> GetAll()
 {
     using (restaurantEntities db = new restaurantEntities())
     {
         return(db.Category.ToList());
     }
 }
Ejemplo n.º 16
0
 //get by id
 public static Category GetById(int id)
 {
     using (restaurantEntities db = new restaurantEntities())
     {
         return(db.Category.Find(id));
     }
 }
Ejemplo n.º 17
0
 //get all
 public static List <CommentVisiter> GetAll()
 {
     using (restaurantEntities db = new restaurantEntities())
     {
         return(db.CommentVisiter.ToList());
     }
 }
Ejemplo n.º 18
0
 //get by id
 public static CurrentEmployee GetById(int id)
 {
     using (restaurantEntities db = new restaurantEntities())
     {
         return(db.CurrentEmployee.Find(id));
     }
 }
Ejemplo n.º 19
0
 //get by id
 public static Tables GetById(int id)
 {
     using (restaurantEntities db = new restaurantEntities())
     {
         return(db.Tables.Find(id));
     }
 }
Ejemplo n.º 20
0
 //get all
 public static List <CurrentEmployee> GetAll()
 {
     using (restaurantEntities db = new restaurantEntities())
     {
         return(db.CurrentEmployee.ToList());
     }
 }
Ejemplo n.º 21
0
 //get all
 public static List <Menu> GetAll()
 {
     using (restaurantEntities db = new restaurantEntities())
     {
         return(db.Menu.ToList());
     }
 }
Ejemplo n.º 22
0
 //add
 public static void Add(Category Category)
 {
     using (restaurantEntities db = new restaurantEntities())
     {
         db.Category.Add(Category);
         db.SaveChanges();
     }
 }
Ejemplo n.º 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();
            }
        }
Ejemplo n.º 24
0
 //delete
 public static void Delete(CurrentEmployee currentEmployee)
 {
     using (restaurantEntities db = new restaurantEntities())
     {
         db.CurrentEmployee.Remove(currentEmployee);
         db.SaveChanges();
     }
 }
Ejemplo n.º 25
0
 //update
 public static void Update(CurrentEmployee currentEmployee)
 {
     using (restaurantEntities db = new restaurantEntities())
     {
         db.Entry(currentEmployee).State = EntityState.Modified;
         db.SaveChanges();
     }
 }
Ejemplo n.º 26
0
 //add
 public static void Add(CurrentEmployee currentEmployee)
 {
     using (restaurantEntities db = new restaurantEntities())
     {
         db.CurrentEmployee.Add(currentEmployee);
         db.SaveChanges();
     }
 }
Ejemplo n.º 27
0
 //delete
 public static void Delete(Tables tables)
 {
     using (restaurantEntities db = new restaurantEntities())
     {
         db.Tables.Remove(tables);
         db.SaveChanges();
     }
 }
Ejemplo n.º 28
0
 //update
 public static void Update(Tables tables)
 {
     using (restaurantEntities db = new restaurantEntities())
     {
         db.Entry(tables).State = EntityState.Modified;
         db.SaveChanges();
     }
 }
Ejemplo n.º 29
0
 //add
 public static void Add(Tables tables)
 {
     using (restaurantEntities db = new restaurantEntities())
     {
         db.Tables.Add(tables);
         db.SaveChanges();
     }
 }
Ejemplo n.º 30
0
 //delete
 public static void Delete(Rating Rating)
 {
     using (restaurantEntities db = new restaurantEntities())
     {
         db.Rating.Remove(Rating);
         db.SaveChanges();
     }
 }