So Many-to-Many did not make it into .NET Core 3.0 release, bummer...
I'm aware of how to implement m:m using a join entity as in this example: https://stackoverflow.com/a/53972658/980917
My question is about the model classes themselves. Consider Student & Class example:
Student - has ICollection<StudentClass>
StudentClass - joining entity
Class - has ICollection<StudentClass>
That is fine for data loading purposes. But in your business logic collection of StudentClasses is not useful as its just a joining entity with 2 IDs. When working with Student or Class you actually want an actual collection of Classes inside a Student and a collection of Students inside a Class. (ie: Student.Classes & Class.Students.
What's the current recommended approach / workaround to retrieve the many-to-many collections (not joining entity)?
Do we have to do a 2nd select based on on the joining entity or is there something more elegant?
A quick example or a link would be great. Thanks.
What's the current recommended approach / workaround to populate those list when pulling data?
- Last part is not clear to me. Would you make it clear please?