//foreign key public interface IRef<TData> { public TData Data {get;} //association public Int64 Key {get; internal set;} //foreign key value public Type Type {get; internal set;} //type of polymorphic association } //example public interface IStorage { public string Name {get;} } [Table] public class Restore: IStorage { public string Name {get;} } [Table] public class Warehouse: IStorage { public string Name {get;} } [Table] public class Sale { [Column] public long ID {get;set;} [Column] public IRef<IStorage> Storage {get;set;} }
6 месяцев назад