本文介绍了实体框架4,TPH(每层次表)和注释的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我目前尝试将我的应用程序从数据集迁移到EF4。
所以我有一个现有的数据库。根据列的值,其中一个表映射到2个类。
所以我在一个TBH模式中有一个现有的表和一个现有的鉴别器。
有没有办法使用注解来解释这个问题?



谢谢

解决方案

没有。 TPH鉴别器只能通过Fluent-API进行控制。


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

解决方案

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

这篇关于实体框架4,TPH(每层次表)和注释的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-21 04:53