public GetUserInformationQueryResult Execute(GetUserInformationQuery query) { var list = _userInformationRepository.GetAll(); var userModelList = new List <UserModel>(); foreach (var item in list) { var timelineModel = new TimelineModel() { TimelineDecision = item.TimelineDecision, NumberOfGeneratedUrls = item.NumberOfGeneratedUrls, NumberOfRetweetsFromTimeline = item.NumberOfRetweetsFromTimeline, NumberOfTweetsFromTimeline = item.NumberOfTweetsFromTimeline, RetweetsCounter = item.RetweetsCounter, CollectedTweetsFromTimeline = item.CollectedTweetsFromTimeline }; var user = new UserModel() { AccountActivity = item.AccountActivity, AccountAnonimity = item.AccountAnonimity, DaysActiveAccount = item.DaysActiveAccount, ScreenName = item.TweetUsername, NumberOfTweets = item.NumberOfTweets, IsBot = item.IsBot, TimelineModel = timelineModel }; userModelList.Add(user); } return(new GetUserInformationQueryResult(userModelList)); }
public IEnumerable <UserInformationEntity> GetAll() => informationRepository.GetAll().Select(model => model.ToBLLInformationUsers());
public async Task <IEnumerable <UserInformation> > GetManyWithCondition(Expression <Func <UserInformation, bool> > condition) { return(condition != null ? await _userInformationRepo.GetManyByCondition(condition) : await _userInformationRepo.GetAll()); }