public async Task <IActionResult> UserNutritionListDetails() { string username = _sessionHelper.GetSessionUsername(); AppUser appUser = await _userService.UserByName(username); List <UserNutritionLists> userNutritionList = await _userNutritionListsService.UserNutritionLists(appUser.Id); var count = userNutritionList.LastOrDefault(); IEnumerable <MealFoods> mealFoods = await _nutritionListService.NutritionListDetailsView(count.FKNutritionListId); UserNutritionListDetails userNutritionListDetails = new UserNutritionListDetails(); userNutritionListDetails.nutritionLists = mealFoods; userNutritionListDetails.appUser = appUser; return(View(userNutritionListDetails)); }
public async Task <IActionResult> NutritionListView(int id) { IEnumerable <MealFoods> alLSportList = await _nutritionListService.NutritionListDetailsView(id); return(View(alLSportList)); }