|
-
Nov 16th, 2015, 12:04 PM
#1
Thread Starter
Addicted Member
EF6 entity mapping. join / navigation property
I have a fairly standard setup using fluent API
Student - entity
StudentId
Name
Course - entity
CourseId
Name
So this is represented quite easily as two entities Student and course with a virtual many to many.
Which creates the below table :
StudentCourse
CourseId
StudentId
For each Course a student is on I want to be able to set a status . e.g. Completed, in progress, etc.
Normally I would put this in the StudentCourse table.
How do I do this in EF?
then if I want to list a students courses I would access the Students.Courses property.
As part of this list I want to see the students status, but status isn't a property on course, how do I represent this?
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|