public virtual async Task <IdentityResourceDto> GetIdentityResourceAsync(int identityResourceId) { var identityResource = await IdentityResourceRepository.GetIdentityResourceAsync(identityResourceId); if (identityResource == null) { throw new UserFriendlyErrorPageException(string.Format(IdentityResourceServiceResources.IdentityResourceDoesNotExist().Description, identityResourceId)); } var identityResourceDto = identityResource.ToModel(); return(identityResourceDto); }