如何使用 CodeFirst 方法在 IdentityServer 4 的客户端 table 中添加新列?
How to add new column in Client table in IdentityServer 4 using CodeFirst approach?
我正在实施 IdentityServer4。我试图将新字段 CustomerId 添加到客户端。在进行迁移时,它正在创建名称为 Client 的新 table,而不是在 Clients table 中添加新列。
namespace xx.xx.Models {
[Table("Clients")]
public class ApplicationClient : Client
{
public string CustomerId { get; set; }
}
}
他们不提供以这种方式扩展模型的能力。但是 ClientProperties 确实存在,因此您可以使用它来将自定义属性存储为 key/value 对。
我正在实施 IdentityServer4。我试图将新字段 CustomerId 添加到客户端。在进行迁移时,它正在创建名称为 Client 的新 table,而不是在 Clients table 中添加新列。
namespace xx.xx.Models {
[Table("Clients")]
public class ApplicationClient : Client
{
public string CustomerId { get; set; }
}
}
他们不提供以这种方式扩展模型的能力。但是 ClientProperties 确实存在,因此您可以使用它来将自定义属性存储为 key/value 对。