![]() ![]() ![]() So if MVC is a separation of concerns pattern, why we need another concept like ViewModels. The View contains all the user interface that the user will interact. The Controller handles all user interaction logic. We design our business domain (after extracting our use cases from the specification document) by creating the appropriate classes in the Models folder. The Model has the data that the View needs to display.The View does not have much logic in them at all. The Controller orchestrates everything.When we have an HTTP request coming in, that request is routed to the Controller. There are three main building blocks in the MVC pattern. MVC is based on an architecture model that embraces the so called "seperation of concerns pattern". ![]() In this post I am going to create a hands on example, a sample ASP.Net MVC application where I will demonstrate the concept of ViewModels. ASP.NET MVC ASP.Net MVC 5.0 ViewModels Entity Framework ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |