MVVM where to put Data Access Layer?

Viewed 29543

I am investigating WPF's MVVM design pattern. But am unsure where to put the Data Acess code?

In some examples I have looked at, data access is performed directly in the ViewModel. It seems odd to put something like linq to sql in the ViewModel? Other examples have a seperate project for Data Access, this seems more like it?

Is this there a general approach? I feel like I am missing something here!

Thanks

6 Answers

The WPF Application Framework (WAF) contains a sample application that shows how the Model-View-ViewModel (MVVM) pattern might be used in combination with the Entity Framework.

Related