O'Reilly logo

Applied ASP.NET 4 in Context by Adam Freeman

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Creating the Domain Model

As I mentioned earlier, there are two kinds of model in an MVC framework: domain models and view models. It is common practice to create a separate class library project for the domain model and add it as a reference to the MVC framework project. The idea is that this helps enforce the separation between the domain model and the rest of the application. I usually take this approach on real projects, but to keep these examples simple, I am going to use the alternate approach of defining the model within the MVC framework project.

images Tip Putting the domain model into a separate project can be a little frustrating if you are ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required