O'Reilly logo

.NET Framework 4.5 Expert Programming Cookbook by A.P. Rajshekhar

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

Implementing the Model and Repository patterns

The MVVM pattern provides a way to separate the UI logic from business and presentation logic. It does so by dividing the application into three components – Model, View, and View-Model. Model represents the data. View is the visual representation of the data and View-Model contains the presentation logic for the Model to be used by the View. We shall look at each of these components in detail, starting with the Model in this recipe.

Model is a class that represents the data. A Model cannot exist on its own. The data it represents must be pulled from a data source and mapped to the Model. That is where the Repository pattern comes into the picture. In this recipe we will implement both the Model and ...

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