示例#1
0
        public RestfulResult All(TagGetAllRequest request)
        {
            if (String.IsNullOrEmpty(request.Type))
            {
                return(new RestfulResult {
                    Data = this._tagDataService.GetAll(request)
                });
            }

            if (request.Type.ToLower() == "refresh")
            {
                return(Refresh(new TagGetRefreshRequest
                {
                    RTs = request.Refreshts
                }));
            }

            return(new RestfulResult {
                Data = this._tagDataService.GetAll(request)
            });
        }
示例#2
0
        public ExecuteResult <List <TagInfoResponse> > GetAll(TagGetAllRequest request)
        {
            if (request == null)
            {
                return(new ExecuteResult <List <TagInfoResponse> >(null)
                {
                    StatusCode = StatusCode.ClientError, Message = "参数错误"
                });
            }



            var entities = _tagRepository.GetListForAll();
            var r        = MappingManager.TagInfoResponseMapping(entities).ToList();


            return(new ExecuteResult <List <TagInfoResponse> >(r));

            //var entities = this._tagRepository.GetListForAll();

            //            return new ExecuteResult<List<TagInfoResponse>>(MappingManager.TagInfoResponseMapping(entities).ToList());
        }