MS EntityFramework: how to split entity with inheritance? -


i have table name transaction in db. want have 2 subclasses transactiona , transactionb. i've made described here: http://www.robbagby.com/entity-framework/entity-framework-modeling-table-per-hierarchy-inheritance/comment-page-1/#comment-607

as use t4 templates i've generated self-tracking entities.

everything okay 1 thing. can see generated entities transactiona , transactionb cannot see them in context object (objectcontext). normal? if so, how transactionb table using context if transaction class accessible?

thanks

this expected. transaction en b derive baseclass transaction. in entity model can access them through collection of transactions this:

context context = new context(); list<transactionb> list = context.transactions.oftype<transactionb>().tolist(); 

Comments

Popular posts from this blog

c# - How to set Z index when using WPF DrawingContext? -

razor - Is this a bug in WebMatrix PageData? -

visual c++ - Using relative values in array sorting ( asm ) -