TPT:具有自己的主键的子表 [英] TPT: Sub-Tables with their own primary keys
问题描述
有没有办法将TPT与"子表"一起使用?具有自己的主键并引用"基表"的主键。使用如下例所示的唯一外键:
- 表动物(Animal-Id,名称)
- 表Cat(Cat-Id,MouseCatchCount, Animal-Id)
问候,
Manfred
Manfred,
我不认为这是目前核心EF支持的映射。 span style ="">
我们可以考虑在未来的EF版本中支持它,但它不会在Code First的第一个版本中提供。
< p style ="margin:0in 0in 0pt"> 谢谢,
Arthur
Hi,
is there a way to use TPT with "sub-tables" that have their own primary key and reference the "base-table" with a unique foreign key like in the following example:
- Table Animal (Animal-Id, Name)
- Table Cat(Cat-Id, MouseCatchCount, Animal-Id)
Regards,
Manfred
Manfred,
I don’t think that this is a mapping that is supported currently in core EF. It is something that we could look at supporting in a future release of EF, but it won’t be available in the first release of Code First.
Thanks,
Arthur
这篇关于TPT:具有自己的主键的子表的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!