我有一个 TPT 继承结构,它允许我在这样的上下文中查询继承的对象:
from test in Context.TestBase.OfType<DerivedType1>()
select test
我是否可以将这些继承的类型添加到基本上下文中,以便我可以像这样查询:
from test in Context.DerivedType1
select test
编辑:要清楚,这是一个数据库优先结构。
我有一个 TPT 继承结构,它允许我在这样的上下文中查询继承的对象:
from test in Context.TestBase.OfType<DerivedType1>()
select test
我是否可以将这些继承的类型添加到基本上下文中,以便我可以像这样查询:
from test in Context.DerivedType1
select test
编辑:要清楚,这是一个数据库优先结构。