Example #1
0
        public async Task <ResultModel> EditNamespaceAsync(EditNamespaceRequestModel requestModel)
        {
            var model = _mapper.Map <EditNamespaceModel>(requestModel);
            await _namespaceService.EditNamespaceAsync(model);

            return(ResultModel.Success("修改成功"));
        }
Example #2
0
        public async Task <ResultModel> EditNamespace(EditNamespaceModel model)
        {
            try
            {
                await namespaceService.EditNamespaceAsync(model);

                return(ResultModel.Success("修改成功"));
            }
            catch (AspectInvocationException ex)
            {
                return(ResultModel.Fail(ex.InnerException?.Message));
            }
            catch (MateralConfigCenterException ex)
            {
                return(ResultModel.Fail(ex.Message));
            }
        }