EntityList / EntityCollection - MVVM Example
I'm working with the new EntityList in the April toolkit to expose a collection in a ViewModel. I also have FK exposed as EntityCollections.
I thought I would expose the collection as IEnumerable, which handles the exposure of a collection using generic interfaces. That leaves the FK that I bind to grids/list .... can I create an enumerable with an embeded object using EntityCollection? Is this the "right" way?
I've also built a number of user controls, each with their own viewmodel. Does this mean the page should have a viewmodel, with the other viewmodels aggregated within it? Should each control stand on it's own, instanciating it's own viewmodel when the user control is embedded in a page?
I know that I could also jump ov开发者_开发百科er to POCO classes, but I'm on a tight deadline, and would like to minimize all the plumbing code.
I'm also a newbie on testing code, but I'm hoping that when I have more time, I can go back and fill that in.
So much to learn, so little time!
Thanks in advance...
You might be interested in the BookLibrary sample application of the WPF Application Framework (WAF). It shows how to combine the Entity Framework 4 with MVVM.
精彩评论