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)); }
public async Task <IActionResult> GetFollowersAsync([FromQuery] FollowingPaginationModel model) { return(this.ConvertResult(await followingService.GetFollowersAsync(model))); }