Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8210127
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T09:57:58+00:00 2026-06-07T09:57:58+00:00

My trivial EDMX has a base entity along with two entities that inherit from

  • 0

My trivial EDMX has a base entity along with two entities that inherit from it…

        <>-------- UserEntity
EntityBase
        <>-------- CustomEntity

…this automatically creates three ObjectSet properties on the generated ObjectContext…

public ObjectSet<EntityBase>   EntityBases {...}
public ObjectSet<UserEntity>   UserEntities  {...}
public ObjectSet<CustomEntity> CustomEntities  {...}

…which is great. I can then use any of these three in my Linq To Entities. I actually want to use self tracking entities and so set the Code Generation Strategy to None. Then add the self tracking T4 templates. But the newly generaed ObjectContext only has the following…

public ObjectSet<CustomEntity> EntityBases {...}

…but the inherited entities of UserEntities and CustomEntities are nowhere to be seen! Can the self tracking entities T4 handle table per type? Surely it can? What gives?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-07T09:58:00+00:00Added an answer on June 7, 2026 at 9:58 am

    That is correct behavior. You will get ObjectSet only for base type and this set is used to access all inherited types as well. If you want to get just UserEntity instances you will use .OfType<UserEntity>() extension method, etc.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Probably a very trivial problem. I have an object that looks like this: @PersistenceCapable
This seems like a trivial syntax issue that I'm unaware of. I would like
This is pretty trivial, but I noticed on SO that instead of an offset
Pretty trivial Java question. This code has an error: public abstract class SubTypeDependentEditor<T> implements
I have a non-trivial Java applet. It has a menu, and via that menu
I have some trivial code that looks like this: SortedDictionary<String, long> d = new
This is probably quite trivial but.... I have a quite complicated linq query that
Rather Trivial Question. So I tried to do this: if (array[0]==some_string) where array is
This is just a trivial question of what convention you suggest. Recently, I have
I have trivial window: this.window = Ext.widget('window', { title: 'Find', closeAction: 'hide', width: 300,

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.