2017-06-25 57 views
0

示例和種子數據顯示在啓動時創建新客戶端。 這在創建客戶端的情況下很好。 是否有更新客戶端的任何現有方法或規定。更新涉及跟蹤來自客戶端收集字段的現有記錄。 考慮到記錄已經在數據庫中可用,更新期間實體如何從IdentityServer4.Models映射到IdentityServer4.EntityFramework.Entities?在IdentityServer4中編輯客戶端

回答

1

你是什麼意思,當你說客戶?如果你的意思是Client for Identity server,那麼你可以在配置類中編輯/配置或添加更多的客戶端或其他資源。雖然啓動,身份服務器將負載可達自身所有的客戶,都因爲這段代碼:

// Add identity server. 

    services.AddIdentityServer() 
     .AddTemporarySigningCredential() 
     .AddInMemoryIdentityResources(Config.GetInMemoryIdentityResources()) 
     .AddInMemoryApiResources(Config.GetInMemoryApiResources()) 
     .AddInMemoryClients(Config.GetInMemoryClients(Configuration)) 
     .AddAspNetIdentity<ApplicationUser>() 
     .AddProfileService<SqlProfileService>(); 
1

是否有更新客戶端的任何現有方法或規定。 更新涉及從收集跟蹤現有記錄 領域的客戶中也

是的,你可以更新客戶端,你可以更新任何其他數據。檢查here你如何使用考慮 記錄已經在數據庫中可用的更新期間identityserver4

的EntityFramework核心是如何從實體映射IdentityServer4.Models到 IdentityServer4.EntityFramework.Entities?

如果檢查IdentityServer4源,你會發現AutoMapper是用來轉換實體空間(namespace IdentityServer4.EntityFramework.Mappers)。並且已提供名爲ToModel的分機號

相關問題