Esempio n. 1
0
        public async Task <IEnumerable <UserDto> > GetFriendsAsync(FriendPaginationModel model)
        {
            User user = await userService.GetUserEntityByIdAsync(model.UserId);

            IEnumerable <User> friends = user?.FriendsFrom.Union(user.FriendsTo);

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

            return(paginationService.MakePage(model, friends));
        }
Esempio n. 2
0
 public async Task <IActionResult> GetFriendsAsync([FromQuery] FriendPaginationModel model)
 {
     return(this.ConvertResult(
                await friendService.GetFriendsAsync(model)));
 }