entity set type inerhit from base?

Discussion of open issues, suggestions and bugs regarding Entity Developer - ORM modeling and code generation tool
Post Reply
Q.X
Posts: 22
Joined: Mon 24 Sep 2012 09:19

entity set type inerhit from base?

Post by Q.X » Thu 22 Jun 2017 08:25

entity framework

base class is: listOrder
derived class is:listItktOrder
type: TPT

why the class "listItktOrder" entity set is not listItktOrders but ListOrders?

Pinturiccio
Devart Team
Posts: 2420
Joined: Wed 02 Nov 2011 09:44

Re: entity set type inerhit from base?

Post by Pinturiccio » Fri 23 Jun 2017 15:59

Yes, EntitySet is created for the root class of a hierarchy.
A query to a descendant class looks like the following:

Code: Select all

var context = new MyContext();
var query = context.ListOrders.OfType<listItktOrder>();

Q.X
Posts: 22
Joined: Mon 24 Sep 2012 09:19

Re: entity set type inerhit from base?

Post by Q.X » Wed 28 Jun 2017 14:10

Pinturiccio wrote:Yes, EntitySet is created for the root class of a hierarchy.
A query to a descendant class looks like the following:

Code: Select all

var context = new MyContext();
var query = context.ListOrders.OfType<listItktOrder>();
thx

Post Reply