示例#1
0
        public IActionResult Index()
        {
            ProfileVM profile = new ProfileVM();

            profile.User     = authProvider.GetCurrentUser();
            profile.Goal     = goalDAL.GetCurrentGoal(profile.User.Id);
            profile.FoodList = foodDAL.GetLoggedFood(profile.User.Id);
            // This is how we get star count. It is called every time the user sees this page
            profile.User.Stars = profileDAL.GetStarCount(profile.User);
            return(View(profile));
        }