public ExecuteResult<GroupStructInfoResponse<BrandInfoResponse>> GetAll4Group(BrandAllRequest request) { var entities = _brandRepository.GetListForAll(); var r = MappingManager.BrandInfoResponse4GroupMapping(entities); return new ExecuteResult<GroupStructInfoResponse<BrandInfoResponse>>(r); }
public ExecuteResult<List<BrandInfoResponse>> GetAll(BrandAllRequest request) { var entities = _brandRepository.GetListForAll(); var r = MappingManager.BrandInfoResponseMapping(entities).ToList(); return new ExecuteResult<List<BrandInfoResponse>>(r); //var entities = this._brandRepository.GetListForAll(); //if (entities == null || entities.Count == 0) //{ // return new ExecuteResult<List<BrandInfoResponse>>(new List<BrandInfoResponse>(0)); //} //return new ExecuteResult<List<BrandInfoResponse>>(MappingManager.BrandInfoResponseMapping(entities).ToList()); }
public RestfulResult GroupAll(BrandAllRequest request) { if (String.IsNullOrEmpty(request.Type)) { return new RestfulResult { Data = _brandDataService.GetAll4Group(request) }; } if (request.Type.ToLower() == "refresh") { return GroupRefresh(new BrandRefreshRequest { Refreshts = request.Refreshts }); } return new RestfulResult { Data = _brandDataService.GetAll(request) }; }