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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T02:24:47+00:00 2026-06-05T02:24:47+00:00

I am using the VS 2010 Entity Framework designer to modify some of the

  • 0

I am using the VS 2010 Entity Framework designer to modify some of the entities that were auto-generated from a database.

The database structure is defined by a product I am building a UI for so I can’t modify it.

The database has tables that have a many-to-many relationship based purely around common values in non-key columns on both tables.

  • Table 1 Users has a single id column userId and another column called userProfile.
  • Table 2 SecurityProfile has a single id column securityProfileId and also has column userProfile.

In other words a User Profile is just a name for a mapping of users to SecurityProfiles.

The wizard created entities for both the Users and SecurityProfile tables. I created a new entity called UserProfile with a single key field: userProfile.

I created a one-to-many association from UserProfile to User and from UserProfile to SecurityProfile. This all works fine except that the UserProfile entity has no table mapping so it won’t compile.

How do I create this association in Entity Framework?

UPDATE:

If it’s not possible using EF (as is suggested by the first answer), is it possible to manually create a non-bound entity that I can use to link these two entities so that I expose an object model that is at least a little easier to navigate?

i.e. I would make the User and SecurityProfile entities abstract and manually define an extension of these with the appropriate properties pointing to my manually created UserProfile entity

  • 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-05T02:24:49+00:00Added an answer on June 5, 2026 at 2:24 am

    You will not. EF is not able to work with many to many association which doesn’t exist in database. EF demands same referential integrity as database – in this case it demands junction table to exist and be mapped to association used in diagram.

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

Sidebar

Related Questions

I'm using Visual Studio 2010 RTM with .NET/Entity Framework 4 RTM with a model
I am getting started with Entity Framework using EF4 in VS 2010 RC. So
I'm using Entity Framework in Visual Studio 2010 Beta 2 (.NET framework 4.0 Beta
To begin with: Using Entity Framework v4.0. ASP.NET MVC 2.0. Visual Studio 2010. I
My scenario I'm using Visual Studio 2010 with Entity Framework 4.1 I have a
Using VS 2010 beta 2, ASP.NET MVC. I tried to create an Entity framework
I've created a web application project in Visual Studio 2010 using Entity Framework Code
I'm using entity framework 4.1 (VS 2010, SQL Server 2012) for inserting data into
I have develop one simple database application build using SilverLight5.0 + Entity Framework +
I am using Entity Framework 4.0, C# 4.0, .Net 2010 and SQL Server 2008

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.