Avatar of itnifl
itnifl
Flag for Norway asked on

Entity Framework - Many to Many relations, query the foreign keys

Looking at http://www.entityframeworktutorial.net/code-first/configure-many-to-many-relationship-in-code-first.aspx, there is generated a table between Course and Students called CourseStudents. How would I go about manipulating and querying that table for information on relations between Course and Students?
.NET ProgrammingWeb FrameworksC#

Avatar of undefined
Last Comment
itnifl

8/22/2022 - Mon
AndyAinscow

re:  https://www.experts-exchange.com/questions/28968035/Entity-Framework-Code-first-Specify-minimum-one-cardinality-in-a-many-to-many-relation.html?anchorAnswerId=41787558#a41787558

In your link above that is doing what I suggested in your previous question.  An intermediate table with two 1:n relationships.

To use it.  Well you can make a query to show all the courses a student has visited, or all the students that visit a course....
ASKER CERTIFIED SOLUTION
itnifl

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
itnifl

ASKER
Your help has saved me hundreds of hours of internet surfing.
fblack61