.NET Framework Bookmark and Share   
 index > Windows Presentation Foundation (WPF) > WPF, MVVM , Entity Framework: Is there an example to show how Entity Frameowk work with MVVM pattern?
 

WPF, MVVM , Entity Framework: Is there an example to show how Entity Frameowk work with MVVM pattern?

Is there an example to show how Entity Frameowk work with MVVM pattern or WPF?
Does it suppose to be the Model layer implement LINQ to Entities?
Thx!

JJChen
I don't know of a specific example combining the EF technology with the MVVM pattern, however...

Entity Framework would really not "intersect" with MVVM code, in any tangible way. The EF code is really all tied to the Model in M-V-VM. MVVM is about interaction between the model and "other layers", in this case, the View (for presentation) and the ViewModel (for control).

Since the EF code is really entirely in the model, and not part of the visual representation of that model, it's a separate issue. You should be able to use any MVVM article for discussion of MVVM, and any EF article for learning about EF. EF is all within the Model, so there shouldn't be too much confusion.

However, there are some really great nuggets of wisdom in this alt.net discussion , in particular, read Glenn Block's responses. He gives some valuable guidance, and some specifics on why you don't want to let the EF code "pollute" your ViewModel (basically, keep EF in the Model, not the View/ViewModel).

Reed Copsey, Jr. - http://reedcopsey.com
Reed Copsey, Jr.

You can use google to search for other answers

Custom Search

More Threads

• A chart element with the name 'Default' could not be found in the 'SeriesCollection'. in WPF
• Treeview vista-like in windows XP !
• Vista looking wpf window on xp machine
• specifying an enum value from within XAML
• Listbox with Image template
• Specify a URI to load an xps into DocumentViewer
• Updating Pages in a Frame
• Context Menu for TreeView Item
• Create Geometry Area
• Adding a ValueConverter to the AutoToolTip of a Slider?