Persistence ignorance and custom models

So far, we have used generated classes as our models. We will now look at creating a custom model and will add persistence ignorance to our design.

Trade-offs of generated models

The Microsoft technology stack provides plenty of solutions that allow for getting up and running with models that support change notifications via INotifyPropertyChanged. As with everything in software development, there are trade-offs to be considered when determining what type of architecture you need; the advantages and disadvantages of using generated models are shown as follows:

Advantages

Disadvantages

Quick to develop

Couples Presentation with data access

Models are generated for you

Changing data access requires difficult ...

Get MVVM Survival Guide for Enterprise Architectures in Silverlight and WPF now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.