Example #1
0
        private async void LoadUser()
        {
            var userModel = ParseUser.CurrentUser;

            this.User = UserViewModel.FromModel(userModel);
            var categories = this.User.Categories.ToList();
            var cats       = categories.Select(cat => new ParseQuery <CategoryModel>()
                                               .GetAsync(cat.ObjectId).Result).ToList();
            var b = 5;
        }
Example #2
0
        private async Task LoadEvents()
        {
            this.Initializing = true;

            //var cache = ParseConfig.CurrentConfig.Get<object>("cache");

            var user   = UserViewModel.FromModel(ParseUser.CurrentUser);
            var events = await new ParseQuery <EventModel>()
                         .Where(ev => ev.Category.Initiative == Initiative.Any ||
                                user.Categories.Any(userCat => userCat.ObjectId == ev.Category.ObjectId))
                         .FindAsync();

            this.Events = events.AsQueryable()
                          .Select(EventViewModel.FromModel);

            this.Initializing = false;
        }