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

  • SEARCH
  • Home
  • 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 7849171
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T18:26:40+00:00 2026-06-02T18:26:40+00:00

I have 2 projects, one that deal with the Data Access and it uses

  • 0

I have 2 projects, one that deal with the Data Access and it uses entity framework and POCO objects to do it. and the second project reference that DAL Project to access the database.

In my second project i need to inherit from a POCO class and provide some default values for some properties and other stuff, at the end i want to add this class or “its base class” to the object context of the entity framework.

But everytime i do i get an exception that says, “Mapping and metadata information could not be found for EntityType ‘MyInheritedClass'”

Is there anyway to work around this without using partial class, or editing the project that has the Data Access Layer.

Thanks

  • 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-02T18:26:41+00:00Added an answer on June 2, 2026 at 6:26 pm

    Unfortunately no. Current versions of EF are not able to work with derived classes if they are not mapped. If you map a class you must use that class type for data retrieval and persistence – EF will never get you instance of non mapped derived type and it will also not accept derived type because EF doesn’t know the type.

    If you want to use derived class you must define it directly in Data Access library and that class must be part of mapped inheritance (and in such case the inheritance will be reflected in your database). Otherwise don’t use inherited class and move all additional properties and logic directly to original POCO (which is btw. supposed usage).

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

Sidebar

Related Questions

I have one project which has RIAService with entity framework that is referenced to
We have a project that uses HP Quality Center and one of the regular
I have two different projects and in one, I have a class that defines
I have a Visual Studio 2010 solution that contains multiple projects. One of these
In one of my iPhone projects, I have three views that you can move
In one of my projects, I have an application that manages several clients (or
In one of my projects, I have some classes that represent entities that cannot
i have done some learning on struts based on one project that i got.Now
I have a project with a lot of panels. I have one method that
I have a large-ish project that contains one class that reads from a file

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.