In general, having shoveled a bunch of stuff, I finally got confused. With view
everything is clear, but the model
and viewmodel
raise questions. Suppose there is a model:
class PersonModel{ public string Name {get; set;} public string LastName {get; set;} }
ViewModel of this model, as I understand it, stores a link to the PersonModel
, commands and communicates with the UI. Now question number 1: Who performs CRUD operations? Does the model keep itself, does ViewModel do this, or is there any manager at all? How is architecture more correct?
Question number 2: What should the ViewModel
look like to work with a collection of model elements and what type of values should it store? PersonModel? PersonViewModel?
If there is an intelligent manual on MVVM - I will be glad to link.