Mid
From PDF
EF Core
Entity Framework Core
What are join tables / linking tables? How to represent them in EF Core?
join table maps a many-to-many relationship. In EF Core:
✅ Auto-created (EF Core 5+):
If you define many-to-many with ICollection<T>, EF creates the join table.
🛠 Manual (custom join entity):
public class StudentCourse
{
public int StudentId { get; set; }
public Student Student { get; set; }
public int CourseId { get; set; }
public Course Course { get; set; }
}
nd configure with Fluent API.
Share this Q&A
Share preview image: https://www.toolliyo.com/images/toolliyo-logo.png