public FriendRequestDto UserRequest(int userId, int targetId)
        {
            var requestForUser = _friendRequestsRepository.GetFirstInclude(x => x.UserId == targetId && x.FromUserId == userId || (x.UserId == userId && x.FromUserId == targetId));

            if (requestForUser == null)
            {
                var friendRequestEmpty = new FriendRequestDto();
                return(friendRequestEmpty);
            }

            return(ModelToDTO.ConvertRequestToDto(requestForUser));
        }
        public List <FriendRequestDto> GetRequests(int userId)
        {
            var requestsForUser = _friendRequestsRepository.GetWhereInclude(x => x.UserId == userId).OrderByDescending(x => x.Id).ToList();

            var requestsForUserDto = new List <FriendRequestDto>();

            foreach (var request in requestsForUser)
            {
                requestsForUserDto.Add(ModelToDTO.ConvertRequestToDto(request));
            }

            return(requestsForUserDto);
        }