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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T23:54:50+00:00 2026-06-03T23:54:50+00:00

I have a code first model that I’m using in a project. But now

  • 0

I have a code first model that I’m using in a project. But now I have other projects that are going to use the same model. Of course, I don’t want to duplicate the model in all projects so the idea is to encapsulate the model in a separate assembly. So far so good, until you also want to “enhance ” the model for some project like adding a ctor with some specific paramaters.

Using partial classes doesn’t work as it needs to be part of the same assembly. Using inheritance doesn’t really work either as entities of the model has ICollection to other entities, so how to make this work ? Am i going in the right direction ?

Not sure I’m very clear, so please be patient 😉

  • 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-03T23:54:52+00:00Added an answer on June 3, 2026 at 11:54 pm

    If you need to have shared model, you really need to place it in separate assembly and this assembly must contain everything you need in all projects. So if you need additional constructor you must add that constructor to the shared assembly. If you don’t want to affect other projects dependent on that assembly you must increment the version of the shared assembly (and use strong name).

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

Sidebar

Related Questions

Using EF Code First I have an model object that has multiple properties that
I have an MVC3 project I created using the Code First paradigm and it
I am using a code-first methodology. I have created my own user model and
Using Entity Framework 4 and code first how would I create a model that
I have the following domain model setup using EF code first: public class User
I have several non-nullable GUID properties in my Code First data model that map
I have some code that first selects an option value in a dropdown menu
I have an Entity in Code First Entity framework that currently looks like this:
I have an AXIS2/JAX-WS web service using a code first implementation (yes I know,
I have a table called Tournaments which is created using the EF code first

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.