如何使用 CodeFirst 方法在 IdentityServer 4 的 Client 表中添加新列?

Man*_*ish 4 c# openid entity-framework-core identityserver4

我正在实施 IdentityServer4。我尝试向 Client 添加新字段 CustomerId。在进行迁移时,它会创建名为 Client 的新表,而不是在 Clients 表中添加新列。

namespace xx.xx.Models {
    [Table("Clients")]
    public class ApplicationClient : Client
    {
        public string CustomerId { get; set; }
    } 
}
Run Code Online (Sandbox Code Playgroud)

mac*_*kie 5

它们不提供以这种方式扩展模型的能力。但是 ClientProperties 确实存在,因此您可以使用它将自定义属性存储为键/值对。