How does the data model fit in to the mix?

Apr 1, 2011 at 10:49 AM

I've been focusing so much on my UI and learning CM for the View and the ViewModel, I've been forgetting about the data Model.
Suppose I have a Customer input view with 20 TextBoxes on it. Yes, CM's convention will connect the TextBoxes to Properties on the ViewModel, and there is (if I remember correctly) the naming convention for Customer_FirstName for rich Models like CSLA. But C# doesn't have multiple inheritance and CM's using the DataContext.
Does that mean I'm going to have to pass though all these TextBoxes, like
  public string FirstName { (get MyModel.FirstName;} {set MyModel.FirstName = value; NotifyOfPropertyChange(() => FirstName;)})


Apr 1, 2011 at 11:01 AM

Ah, a brainwave after search these discussions a bit more. I think it's nested classes I'm looking for, where the Model is nested within the ViewModel.
Am I right?

Apr 1, 2011 at 2:15 PM
Edited Apr 1, 2011 at 2:15 PM

Can you please restate what your problem is? I'm a bit confused.

Apr 2, 2011 at 6:03 PM

What options and/or techniques are there to connect the ViewModel to the Model while still using CM's features to the fullest extent?