コード例 #1
0
ファイル: MemberRepository.cs プロジェクト: guoyu07/Alfred-1
        public async Task <MemberResponseModel> GetMembers(MemberCriteriaModel criteriaModel)
        {
            var criteria     = _modelFactory.CreateMemberCriteria(criteriaModel);
            var membersCount = await _memberDao.CountMembers(criteria).ConfigureAwait(false);

            var memberResponse = new MemberResponse
            {
                Links   = CreateLinks(criteria.Page, criteria.PageSize, membersCount),
                Results = await CreateMembers(criteria, membersCount).ConfigureAwait(false)
            };

            return(_modelFactory.CreateMemberResponseModel(memberResponse));
        }