Having trouble putting the Model into the Model-View-Controller
Posted on 2009-04-25
I have created a new application using the ASP.NET MVC Web Application, which contains a Models folder, with nothing inside. When I right click, the item in the list which I asume I should chose is Class. But when I do so I get an empty class and no guidance from Visual Studio (2008). This is correct behavior, but I am just trying to show you why I am stuck.
On the other hand, if I want Visual Studio to hand hold me and generate everything, the thing to choose is ADO.NET Entitiy Data Model. This handles everything, and works fine. But since it puts all the funtion calls into Designer.cs, which is machine generated, I then have a hard time trying to use it as an example how to properly make the conection from the Controller to the Model. So I am not able to replicate an existing function call and create my own calls, which is what I'd like to learn how to do.
Could someone please give me some function headers (and references) and show me where they belong? By this I mean what goes into the Model, the View and the Controller, to create some very simple communication.