コード例 #1
0
        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));
        }
コード例 #2
0
 public IEnumerable <UserInformationEntity> GetAll() => informationRepository.GetAll().Select(model => model.ToBLLInformationUsers());
コード例 #3
0
 public async Task <IEnumerable <UserInformation> > GetManyWithCondition(Expression <Func <UserInformation, bool> > condition)
 {
     return(condition != null ? await _userInformationRepo.GetManyByCondition(condition) : await _userInformationRepo.GetAll());
 }