コード例 #1
0
ファイル: ServiceBase.cs プロジェクト: wiedemann-en/away
        public ResponseQueryDto <TDto> GetActives(params string[] includes)
        {
            ResponseQuery <TEntity> info   = _repository.GetActives(includes);
            ResponseQueryDto <TDto> result = new ResponseQueryDto <TDto>();

            result.Items = _mapper.Map <List <TEntity>, List <TDto> >(info.Items);
            result.Total = info.Total;
            return(result);
        }
コード例 #2
0
ファイル: ServiceBase.cs プロジェクト: wiedemann-en/away
        public ResponseQueryDto <TDto> Get(ISpecification <TEntity> specification = null)
        {
            ResponseQuery <TEntity> info   = _repository.Get(specification);
            ResponseQueryDto <TDto> result = new ResponseQueryDto <TDto>();

            result.Items = _mapper.Map <List <TEntity>, List <TDto> >(info.Items);
            result.Total = info.Total;
            return(result);
        }