示例#1
0
        public IActionResult FoodHistory()
        {
            var user = _db.Users.FirstOrDefault(u => User.Identity.Name == u.UserName);
            FoodHistoryViewModel foodData = new FoodHistoryViewModel()
            {
                foods = GetAllUserFoods(user.Id)
            };

            return(View(foodData));
        }
示例#2
0
 public FoodHistoryPage()
 {
     InitializeComponent();
     ViewModel      = new FoodHistoryViewModel();
     BindingContext = ViewModel;
 }