Exemple #1
0
        public IEnumerable <Models.Products> GetAllProducts()
        {
            IEnumerable <Models.Products> lst;

            using (Models.ExamAxityEntities db = new Models.ExamAxityEntities())
            {
                lst = db.Products.ToList();
            }

            return(lst);
        }
Exemple #2
0
        public IEnumerable <Models.Users> Login(string user, string psw)
        {
            IEnumerable <Models.Users> lst;

            using (Models.ExamAxityEntities db = new Models.ExamAxityEntities())
            {
                lst = db.Users.ToList().Where(x => x.Nombre == user && x.Password == psw).ToList();
            }

            return(lst);
        }