Exemplo n.º 1
0
        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));
        }