public IEnumerable <Models.Products> GetAllProducts() { IEnumerable <Models.Products> lst; using (Models.ExamAxityEntities db = new Models.ExamAxityEntities()) { lst = db.Products.ToList(); } return(lst); }
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); }