Пример #1
0
        public async Task <ArtifactResponseModel> GetArtifacts(ArtifactCriteriaModel criteriaModel)
        {
            var artifactCriteria = _modelFactory.CreateArtifactCrtieria(criteriaModel);
            var resultCount      = await _artifactDao.CountArtifact(artifactCriteria).ConfigureAwait(false);

            var artifactResponse = new ArtifactResponse
            {
                Links   = CreateLinks(artifactCriteria.Page, artifactCriteria.PageSize, resultCount),
                Results = await CreateResults(artifactCriteria, resultCount).ConfigureAwait(false)
            };

            return(_modelFactory.CreateArtifactResponseModel(artifactResponse));
        }