private async Task <FollowEntity> GetFollowAsync(Guid followerId, Guid followeeId)
        {
            var followFromRepo = await _followRepo
                                 .GetSingleFollowAsync(followerId : followerId, followeeId : followeeId);

            return(followFromRepo);
        }
Esempio n. 2
0
        private async Task <FollowEntity> GetFollowAsync(Guid loggedUserId, Guid followeeId)
        {
            var followFromRepo =
                await _followRepo.GetSingleFollowAsync(loggedUserId,
                                                       followeeId);

            if (followFromRepo is null)
            {
                throw new NotFoundException("Follow hasn't been found.");
            }

            return(followFromRepo);
        }
Esempio n. 3
0
        private async Task <bool> IsAlreadyFollowedAsync(FollowEntity follow)
        {
            var followFromRepo = await _followRepo.GetSingleFollowAsync(follow.FollowerId, follow.FolloweeId);

            return(followFromRepo is not null);
        }