Say for example I have this simple model
class Student
{
List<Course> Courses { get; set; }
}
class Course
{
Student Student { get; set; }
}
Do I have to map the relationship in both directions?
Example
builder
.Set<Course>()
.HasOne(o => o.Student)
.WithMany(o => o.Courses)
.HasForeightKey("StudentId");
builder
.Set<Student>()
.HasMany(o => o.Courses)
.WithOne(o => o.Student)
.HasForeignKey("StudentId");