WPF MVVM Samples with Database
you could have a look at those:
http://www.codeproject.com/KB/WPF/WPF_MVVM_DB_Access.aspx
or just this:
The BookLibrary (WPF MVVM) sample application of the WPF Application Framework (WAF) uses the Entity Framework in combination with a SQL CE database.
I would recommend Building Enterprise Applications with Windows Presentation Foundation and the Model View ViewModel Pattern publish by Microsoft.
http://shop.oreilly.com/product/0790145309686.do#tab_04_0
you can find the source code here