/// <summary> /// 异步创建API范围 /// </summary> /// <param name="dtos"></param> /// <returns></returns> public Task <OperationResponse> CreateApiScopeAsync(ApiScopeDto dto) { dto.NotNull(nameof(dto)); return(_apiScopeRepository.InsertAsync(dto, async(dto1) => { MessageBox.ShowIf($"指定【{dto.Name}】Api范围已存在", await this.CheckApiResourceIsExist(dto1.Id, dto1.Name)); })); }