Exemplo n.º 1
0
        private async Task <List <PersonAllin> > GetPersonInvolve(Author author)
        {
            int authorType = author.AuthorTypeId;
            IEnumerable <PersonAllin> people = null;

            switch (authorType)
            {
            case (int)my8Enum.AuthorType.Person:
                people = await _personRepositoryN.GetFriends(author.AuthorId);

                return(people.ToList());

            //case (int)AuthorTypeEnum.Page:
            //    people = await _pageRepositoryN.GetPersonFollow(author.AuthorId);
            //    return people.ToList();
            //case (int)AuthorTypeEnum.Community:
            //    people = await _communityRepositoryN.GetMembers(author.AuthorId);
            //    return people.ToList();
            default:
                break;
            }
            return(null);
        }
Exemplo n.º 2
0
 private async Task<List<PersonAllin>> GetPersonInvolve(int authorType,string authorId)
 {
     IEnumerable<PersonAllin> people = null;
     if (authorType == (int)my8Enum.AuthorType.Person)
     {
         people = await m_PersonRepository.GetFriends(authorId);
         return people.ToList();
     }
     if (authorType == (int)my8Enum.AuthorType.Page)
     {
         people = await m_PageRepository.GetPersonFollow(authorId);
         return people.ToList();
     }
     if (authorType == (int)my8Enum.AuthorType.Community)
     {
         people = await m_CommunityRepository.GetMembers(authorId);
         return people.ToList();
     }
     return null;
 }
Exemplo n.º 3
0
        public async Task <List <PersonAllin> > GetAllFriend(string personId)
        {
            IEnumerable <PersonAllin> friends = await m_personRepositoryN.GetFriends(personId);

            return(friends.ToList());
        }