コード例 #1
0
ファイル: FoodController.cs プロジェクト: pattm0824/Main
        public IActionResult ModifyFoodItem(string mealType)
        {
            SearchFoodVM vm   = new SearchFoodVM();
            User         user = authProvider.GetCurrentUser();

            vm.FoodList = foodDAL.GetLoggedFood(user.Id);
            vm.MealType = mealType;

            return(View(vm));
        }
コード例 #2
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));
        }