In the previous Quick Tip, we handled a one-to-many relationship between two entities, by allowing users to update the association in an Edit View. We did do it on the easy side, however, since in our example, one Author only has one Community assigned. If we were creating an Edit view for the Community entity, we would have to apply a slightly different technique to be able to assign authors to the community, since one Community can have any given number of Authors.

If I find the time I'll write a Quick Tip about it as well, but for now, I found this great post that handles both one-to-many and many-to-many relationships:

http://www.mikesdotnetting.com/Article/110/ASP.NET-MVC-Entity-Framework-Modifying-One-to-Many-and-Many-to-Many-Relationships

If you exclude the AJAX part of post, you see the scenario is very similar to ours (although slightly more complex).The way Mike addresses the many-to-many relationship if pretty much what we would do to allow users to add or remove authors from a Community. Very good read!

I'll try to finish the "Bulletproof Edit View" very-long-quick-tip (hmm, this doesn't sound right...) tomorrow.

Until then, have fun!