How to recognize that mapping ViewModel to Model was break?

Feb 22 at 3:43 PM

Hi Geert,

Thanks for great MVVM framework.

We are developing WPF Front-End using Catel, our partners are developing Back-End containing Models. Models are POCO - without inheritance DataObjectBase. Our ViewModels inherit ViewModelBase.

In development process our partners are changing DB sometimes and also Models classes. This is strong stability issue, because we don’t know in VS(Visual Studio) build process that changes were made in Models, only in run-time (when run app. and use ViewModel) app throw exceptions.

Is it possible recognize that our mapping ViewModel to Model was break in VS build process or in some unit tests or somehow else?

Thanks’ for reply.

Coordinator
Feb 22 at 4:09 PM

Hi Kurko,

The only way to be really sure is to write unit tests. Then inject the model and you will get an exception when a mapping is invalid.

 

Best regards,

Geert