コード例 #1
0
        public async Task <CollectionResult <GetRobotModelDto> > GetModelsByFilterParamsAsync(
            RobotModelFilterParamsDto filterParams,
            CancellationToken ct = default)
        {
            var robotModelFilterParams = _mapper.Map <RobotModelFilterParams>(filterParams);

            var robotModels =
                await _unitOfWork.RobotModelRepository.GetModelsByFilterParamsAsync(robotModelFilterParams, ct);

            return(_mapper.Map <CollectionResult <GetRobotModelDto> >(robotModels));
        }
コード例 #2
0
        public async Task <ActionResult> GetModelsAsync([FromQuery] RobotModelFilterParamsDto filterParams)
        {
            var models = await _robotModelService.GetModelsByFilterParamsAsync(filterParams);

            return(Json(JsonResultData.Success(models)));
        }