Exemple #1
0
        public async Task <IActionResult> Index()
        {
            var user = await UserManager.GetUserAsync(User);

            var dasboardViewModel = new DashboardViewModel()
            {
                RecipeNumber = await _recipeService.CountRecipesAsync(user),
                Plan         = await _planService.GetLastAddPlanAsync(user),
                PlanNumber   = await _planService.CountUserPlanAsync(user),
                DayNames     = await _dayNameService.GetAllAsync()
            };

            return(View(dasboardViewModel));
        }