Example #1
0
        public async Task <List <FollowListVM> > UserFollowers(int id, int pageIndex)
        {
            List <int> followers = await _followService.FollowerList(id);

            var followersList = await _unitOfWork.AppUser.GetFilteredList(selector : y => new FollowListVM
            {
                Id        = y.Id,
                ImagePath = y.ImagePath,
                UserName  = y.UserName,
            },
                                                                          predicate : x => followers.Contains(x.Id),
                                                                          include : x => x
                                                                          .Include(z => z.Followers),
                                                                          pageIndex : pageIndex);

            return(followersList);
        }