Great example

Aug 28, 2009 at 4:07 PM

This is a great example for MVVM! It is very helpful for people (like me) who are new to MVVM. It is even better that it uses a sql server database backend; more real-world than most sample apps I have seen out there. Thanks!

The only issue I have come across is the DataContext of the CustomerView (CustomerViewModel) was commented out, and when I uncomment it, it says "cannot create an instance of type 'CustomerViewModel'".

Thanks again.

Oct 15, 2009 at 11:53 PM

the issue is whether you have the AdventureWorkLT2008 and/or sql express. In my case, I had to download the AdventureWorks DB and attach it to SQL2005. Also change the connection string in App.Config and the Settings.settings value in the MVVM.Model to adapt to your setup.after that, the sample will run ok. One last word of caution, when I ran it in Debug mode, the OnCreated() line of code was always skipped meaning you don't get any customers displayed. When you from run the .exe however it runs fine. HTH



Oct 31, 2009 at 7:32 PM

Jose you are right.

Please follow my new series of tutorials about prism, they cover also this part and there is a new codeplex project more robust and including all the docs.

Feb 2, 2010 at 4:00 PM


I too have the Adventureworks DB on SQLServer 2005 and I changed connection string but still got error 'Invalid object SalesLT.Address'.

Did you have to recreate the objects or any other step to get it working.





Feb 3, 2010 at 2:46 AM

SM, I looked at my DB and the SalesLT table exists in the AdventureWorksLT database (Instead of the AdventureWorksDB. it can be found in let me know if that doesn't work. Thanks,


p.s.: make sure you fully name the instance in your connection string (dont'use . ), also make sure the setting.settings value in MVVM.Model reflects the changes in the conn string. Also, once you compile, run the executable as opposed to running in debug mode from VS. good luck!