コード例 #1
0
        public ActionResult GetAllWishListsOfUser(int userId)
        {
            var allWishLists = _wishListService.GetAllWishListsOfUser(userId);

            if (userId != CurrentUser.Id)
            {
                allWishLists = allWishLists.Where(w => w.Friends.Count(f => f.FriendId == CurrentUser.Id) != 0);
            }

            var model = Mapper.Map <IEnumerable <WishListViewModel> >(allWishLists.ToList());

            return(PartialView("_UsersWishLists", model));
        }