Entity Framework 4, TPH (Table Per Hierarchy) and annotation

泪湿孤枕 提交于 2019-12-11 02:56:23

问题


I currently try to migrate an application of mine from datasets to EF4. So I have an existing database. One of the tables is mapped to 2 classes, depending of the value of a column. So I am in a TBH schema with an existing table and an existing discriminator. Is there a way to discribe this using annotations ?

thanks


回答1:


No. TPH discriminator can be controlled only through Fluent-API.



来源:https://stackoverflow.com/questions/10014410/entity-framework-4-tph-table-per-hierarchy-and-annotation

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!