Entity Framework multitenant shared data architecture: single column, multiple foreign keys
问题 I have the following data structure: //property Notification abstract class BindableBase { } //base class for all tenant-scoped objects abstract class TenantModelBase : BindableBase { int TenantId; } abstract class Order : TenantModelBase { Customer Customer; //works: mapped using TenantId and CustomerId Product Product; //again, works with TenantId and ProductId string ProductId; string CustomerId; } class Customer: TenantModelBase { string CustomerId; } class Product : TenantModelBase {