How to model a Many to many-relationship in code?
问题 Suppose I have 2 tables in a database. eg: Dog & Boss This is a many to many relationship, cause a boss can have more than 1 dog, and a dog can have more than 1 owner. I am the owner of Bobby, but so is my wife. But many to many is not allowed, so there is a helpertable: DogsPerBoss How to model this in code? Class Boss can have a collection of Dogs. Class Dog can have a collection of Bosses. --> at least, that is what I think. Perhaps there are better solutions? How about extra data that is