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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T21:25:17+00:00 2026-06-01T21:25:17+00:00

in a C# project, using EF Database first I’ve added a foreign key to

  • 0

in a C# project, using EF Database first I’ve added a foreign key to a table using SQL server management studio.

After that, back to Visual Studio I’ve updated the model from the database but I couldn’t see the “link” (i.e. the line joining the two tables in the .edmx diagram) between the two affected tables. So in the dropdown over the child table I saw this option “Entity key” and when I clicked it the “link” appeared. To be honest, I don’t know and I can’t understand what it does, cause I can check or uncheck it now without losing the, again let’s say “link”.

Do you know why this behaviour?

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-01T21:25:19+00:00Added an answer on June 1, 2026 at 9:25 pm

    EntityKey is the Entity idea of a Primary Key in a (SQL in your case) database. You should set it for any column that is a primary key, and then you can setup your Entity Associations to match your database associations.

    Working with Entity Keys.

    Setting correct EntityKeys is a must for getting correct results from SQL Server, because EntityKeys are used as an internal caching key.

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

Sidebar

Related Questions

I am using a SQL Server database in my current project. I was watching
I successfully created my first Entity Framework Code first project using SQL Server CE.
I'm working on a project that is considering using Cassandra as a database. We
I am working on a project that is using an Oracle database with stored
Say I have a database that stores table data by year using an identical
This is my first project using a NoSQL database and I am wondering how
My team working in a project using Winforms application(c#) & MSSQL 2005 as database.
At work, we recently started a project using CouchDB (a document-oriented database). I've been
I am using MySQL database and JSP for a project. In my project there
In a project we are using CodeSmith to generate database layer, Codesmith seperate creates

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.