About
Pricing
Community
Teams
Start Free Trial
Log in
itnifl
asked on
9/7/2016
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 Programming
Web Frameworks
C#
3
1
Last Comment
itnifl
8/22/2022 - Mon
AndyAinscow
9/7/2016
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
9/7/2016
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
9/15/2016
ASKER
The answer is in
http://stackoverflow.com/questions/4253165/insert-update-many-to-many-entity-framework-how-do-i-do-it
Your help has saved me hundreds of hours of internet surfing.
fblack61
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....