public ActionResult Index3() { var _entities = new Model.AppContext(); var model = _entities.Products.Include(c => c.Nutrient); return(View(model)); }
public ActionResult Index2() { var _entities = new Model.AppContext(); var model = _entities.Products; return(View(model)); }
public ApplicationUser CheckCurrentUser() { AppContext _entities = new Model.AppContext(); string currentUserId = User.Identity.GetUserId(); UserManager <ApplicationUser> manager = new UserManager <ApplicationUser>(new UserStore <ApplicationUser>(_entities)); ApplicationUser currentUser = manager.FindById(currentUserId); return(currentUser); }