コード例 #1
0
        public async Task <IActionResult> IndexAsync()
        {
            Person who = await _auth.GetCurrentPersonAsync(User);


            return(View(new IndexVM
            {
                Foods = _calories.GetFoods(),
                Meals = await _calories.GetTodaysMealsAsync(who),
                Who = who,
            }));
        }
コード例 #2
0
 public ActionResult Index()
 {
     return(View(_calories.GetFoods()));
 }