예제 #1
0
        internal async Task <IEnumerable <Developer> > GetDeveloperFriends(string username, CancellationToken cancellationToken = default)
        {
            var gitFriendsColl = await _githubService.GetFollowers(username, cancellationToken);

            if (gitFriendsColl == null)
            {
                return(null);
            }

            List <Developer> friendsColl = new List <Developer>();

            foreach (var item in gitFriendsColl)
            {
                var dbDeveloper = await _developerRepository.CreateOrUpdate(item, cancellationToken);

                friendsColl.Add(dbDeveloper);
            }

            return(await _developerRepository.ListAllExceptInLikeAndDeslike(username, cancellationToken));
        }