I've been reading and watching videos about MVC and I'm starting to get a little confused. The simple tutorials are far too simple and they seem to only involve a single database table. Whoopty doo!
The advanced tutorials assume a lot of knowledge is present and I have trouble following those. Not to mention, there are 15 ways to model your database and nobody wants to explain why they do it this way or that way.
So, I'm looking for a simple tutorial or explanation of what process you would go through to design a simple CRUD application that involves a many-to-many relationship, explained below. I may not have provided enough information so feel free to request updates.
Updates: I would be interested in seeing a Linq To Sql solution.
I went through the nerddinner PDF and my model has to be a little different than his. I want a many-to-many relationship with my Meal and my Ingredients. He just uses a 1-to-many with his Dinner and RSVPs. Also, he never shows how he attached the RSVPs to his Dinner model. This is essentially the problem I'm having. Why is it that my Meal model does not contain a list of Ingredients? I have the proper foreign keys in place. I'm not sure where or how I would set it up so that I can access the ingredients through the Meal model if I wanted to print them on the details view or something.
Meals
- Id
- Title
- Description
Ingredients
- Id
- Name
Meals-Ingredients
- Id_Meal
- Id_Ingredient