TPT:具有自己的主键的子表 [英] TPT: Sub-Tables with their own primary keys

查看:78
本文介绍了TPT:具有自己的主键的子表的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述


有没有办法将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屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆