I have table name Transaction in the DB. I want to have 2 subclasses TransactionA and TransactionB. I’ve made it as described here: http://www.robbagby.com/entity-framework/entity-framework-modeling-table-per-hierarchy-inheritance/comment-page-1/#comment-607
The problem is I need to use the field that is discriminator here (see the example, it’s PersonCategory there). But it has to be deleted after that I cannot use it.
How to solve this problem?
Thanks
If it is a discriminator its only usage is to map record to either
TransactionAorTransactionB. It cannot be set in the application. It is set if you insertTransactionAinstance orTransactionBinstance and record. It also cannot be updated because object of one type cannot change to object of other type – if you need such logic you cannot model it as inheritance.