public Task <User> FindById(string id) { if (String.IsNullOrWhiteSpace(id)) { return(Task.FromResult((User)null)); } return(Task.FromResult(_userFinder.FindById(id))); }
public List <Story> GetStoriesByUserName(string id) { if (String.IsNullOrWhiteSpace(id)) { return(null); } if (_userFinder.FindById(id) == null) { return(null); } return(_storyFinder.GetStoriesByUserId(id)); }
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); }