Exemplo n.º 1
0
        public async Task <IEnumerable <UserDto> > GetFollowersAsync(FollowingPaginationModel model)
        {
            User user = await userService.GetUserEntityByIdAsync(model.UserId);

            if (user is null)
            {
                return(null);
            }

            Expression <Func <User, bool> > filter = u => user.Followers.Contains(u);

            return(await paginationService.GetRangeAsync(model, filter));
        }
Exemplo n.º 2
0
 public async Task <IActionResult> GetFollowersAsync([FromQuery] FollowingPaginationModel model)
 {
     return(this.ConvertResult(await followingService.GetFollowersAsync(model)));
 }