public async Task <IActionResult> CreateOrUpdateIdentityResourceAsync(IdentityResourceDto dto) { var result = await identityResourceService.CreateOrUpdateIdentityResourceAsync(dto).ConfigureAwait(false); if (result.Succeeded) { return(Ok()); } ModelState.AddModelError(string.Empty, result.ErrorMessage); return(BadRequest(ModelState)); }