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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T09:57:33+00:00 2026-05-13T09:57:33+00:00

I’m trying out the Model First approach introduced in Entity Framework with VS2010/.Net 4.0,

  • 0

I’m trying out the Model First approach introduced in Entity Framework with VS2010/.Net 4.0, and now I don’t really know how to do this. I start out with the following Entities:

Contact                           Event
*******                           *****
Id (Int32, not null, pk)          Id (Int32, not null, pk)
Name (Name, not null)             Name (String, not null)
Address (Address, not null)       Duration (Duration, not null)
Email (String)
Phone (String)

where Name, Address, and Duration are complex types that I defined.

Now, I want to add an RSVP Entity, which works as a many-to-many mapping from Contacts to Events, but also holds some extra information in a complex type I called Payment. The table would probably look something like this:

RSVP
****
ContactId (int, not null, pk)
EventId (int, not null, pk)
Payment_Date (datetime, not null)
Payment_Amount (double, not null)

When try to construct this entity in the Model Designer, I want to add the ContactId and EventId fields by adding many-to-many relationships to the respective tables, but when I do so I can’t select the two fields to be the primary key of the table (or the Entity Key of the entity).

How do I do this?

  • 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-13T09:57:33+00:00Added an answer on May 13, 2026 at 9:57 am

    I think it becomes more complicated than a simple many-to-many relationship between the two entities when you add the additional data points to the link table. Once the linking possesses its own data, it can no longer be abstracted away to a mere navigation property.

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

Sidebar

Related Questions

No related questions found

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.