Example #1
0
 public Task <User> FindById(string id)
 {
     if (String.IsNullOrWhiteSpace(id))
     {
         return(Task.FromResult((User)null));
     }
     return(Task.FromResult(_userFinder.FindById(id)));
 }
Example #2
0
 public List <Story> GetStoriesByUserName(string id)
 {
     if (String.IsNullOrWhiteSpace(id))
     {
         return(null);
     }
     if (_userFinder.FindById(id) == null)
     {
         return(null);
     }
     return(_storyFinder.GetStoriesByUserId(id));
 }
Example #3
0
        public async Task <List <Comment> > GetCommentByIdStory(int StoryId)
        {
            var resylt = _commentFinder.GetCommentByIdStory(StoryId);

            foreach (var item in resylt)
            {
                if (item.User == null)
                {
                    item.User = _userFinder.FindById(item.UserId);
                }
            }
            return(resylt);
        }