When a many-to-many relation is defined within models, a third table is auto created by Entity framework. I am able to see this table within the database but I am not sure how I would access it's data. The third table is ApplicationUserProject defining a relationship between Projects and Users
How might access this table and it's data? Thanks in advance
Third generated table
CodePudding user response:
In your particular case you do not need access to intermediate table.
var query = context.Users
.Where(u => u.Projects.Any(p => p.Id == projectId));