开发者

List Implementation and Custom Types

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 l开发者_开发技巧ooking 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.


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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜