SimpleMVVM using Entity Framework

Sep 7, 2012 at 10:28 AM

I'm starting a new project on WPF and after looking at various patterns and toolkits I'm considering Simple MVVM for it.  I'm coming from ASP.Net MVC 3/4 background with a lot of data access built already in Entity Framework (and experience).

I'm just running through your getting started videos and docs to get a feel for the development but before I invest too much time I was wondering how EF would fit into a Simple MVVM WPF Project.  Do you have any samples or tutorials you've done which utilises EF for the data?  Using WCF to implement access is going to slow down development and the app as the database/EF layer will be locally available on the machine running it.

Thanks, Darren

Sep 7, 2012 at 2:49 PM
Take a look at the projects in the "Main" samples folder after installing the toolkit (you'll need to unzip the file). However, these are using EF from within a WCF service. For a "client-server" approach you'd need to copy the code from the service data access layer into the client. Shouldn't be too hard, because the EF code is already in a separate assembly. However, as a general rule, you'd want at least to abstract away the data access code using interfaces (Repository pattern).