tags:

views:

46

answers:

1

I apologize in advance if this is vague...What is the best or most practical way to implement lists of custom types for MVVM? I had someone tell me that for each type I have I should have corresponding List of it. For example, if I have a Customer class I should also have a CustomerList class whose base class is List and within this class I should do all my work on any list of Customers.

Since I am looking to start writing a couple applications using MVVM should each model contain a Customer and CustomerList class and then do I need a ViewModel for each of those Models? I am just all sorts of confused and this seems to be overkill.

If someone could please explain this to me or point me in the right direction I would appreciate it. I have look at quite a few MVVM videos and get the overall idea but some of this implementation I just haven't gotten yet.

A: 

I am not quite sure what your friend was talking about in needing a list for every class. I know some of the more common tutorials bind to ObservableCollections in their examples.

My suggestion is learn MVVM from tutorials, on your own, and then possibly teach your friend a little more about MVVM.

Here's a question that will help you learn MVVM better.

jsmith
I guess he wasn't strictly talking about MVVM and needing a list for every class, that was more when I was working with win forms.