我想根据使用Entity Framework的一些声明从ClientClaims访问客户端。
例如,我有多个客户的声明{Type: Org, Value: 6 }
。
我希望所有客户都有这种说法。
这是实体:
namespace IdentityServer4.EntityFramework.Entities
{
public class ClientClaim
{
public int Id { get; set; }
public string Type { get; set; }
public string Value { get; set; }
public Client Client { get; set; }
}
}
它没有ClientID,而Client属性不是虚拟的,因此Entity Framework无法填充数据,而是null
。
我怎样才能做到这一点?