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 1098673
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 17, 20262026-05-17T00:36:49+00:00 2026-05-17T00:36:49+00:00

I am looking to setup architecture for entity framework that will break apart the

  • 0

I am looking to setup architecture for entity framework that will break apart the entities into multiple models. What I am wondering if it is possible to code-generate one set of entities, so that each model uses the same set of data access classes? I realize the issue with contexts, but I was wondering if each context really needed to have its own set of classes, or I can create many contexts but only have one set of classes that represent the backend tables, using the self-tracking entities generation feature.

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-05-17T00:36:50+00:00Added an answer on May 17, 2026 at 12:36 am

    You can definitely share POCO classes across multiple models.

    For example a class like this:

    public class Person
    {
       public int ID {get;set;}
       public string Firstname {get;set;}
       public string Surname {get;set;}
       public string Lastname {get {return Surname;} set {Surname = value;}}
    }
    

    Would work in an EDMX that defines Person as ID,Firstname,Surname
    And would work in a second EDMX that defines Person as ID,Firstname,Lastname

    Not sure though about Self-Tracking Entities, STEs are ‘POCO’ but they also have some model specific code which might break if the definition of the EntityType is different in your two EDMXs (like in my above sample).

    You’d have to try it out.

    Hope this helps

    Alex (Former EF team member)

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

Sidebar

Related Questions

I am looking to setup a Server that accepts a URL with a few
I was looking at Microsoft for a setup package for .NET 1.0 that includes
We in our company are looking to setup a code repository to which multiple
Hi all is this possible. I am looking to setup a jquery filter could
I'm just looking to setup a simple TextView wrapped in a ScrollView which will
Setup: I'm looking for insight into using a ABPersonViewContoller without getting data from the
I'm looking to setup a lightweight, developer only web stack on Windows (and possible
Architecture Design Looking for some suggestions for a new architecture that I am putting
I am looking to setup Amazon EC/2 nodes on rails with Riak. I am
I'm looking to setup a custom route which supplies implicit parameter names to a

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.