Question

I develop in WPF with EF (EDM designer entities).

I now want to move to Silverlight+RIA, and I am looking for a turorial, video or whatever that will guide me how-to to use Silverlight RIA with MVVM using EF as the model.

I have extensive knowledge of: .NET 4, WPF, XAML, DPs, DataTempaltes, EF 4. I am familiar with Silverlight, WCF RIA and MVVM.

There are two things about LOB+MVVM I am encountering difficulties:

  1. I am looking for a way to template my work, so I don't have to copy-paste the content of my ViewModels, what I mean by that is having a generic ViewModelBase that will handle a certain type of Model(s):

    ViewModelBase where TContext : DomainContext, TModel : Entity`

  2. Another difficulty is the overall composition of the UI; say I have a branch of master detail that gets complicated more and more all in one screen. I want all the parts to be divided into tiny Views each for its point. The problem is, I don't know how to expose the data for the inner views, say the main view's DataContext is set with MainViewModel, and there is a property Contact in the MainViewModel; how would you set the Contact view inside the MainView, setting the inner view (the ContactView)'s DataContext to ContactViewModel AND setting the ContactViewModel's Contact to the current Contact from the MainViewModel, what is the right technique??

NOTE: I am self-employeed, no teams and not other developers, so I don't see a reason splitting everything into modules, I don't mind if the whole project will reside in one project split into folders etc.

Was it helpful?

Solution

I always find Mike Taulty's blogs useful for this sort of thing.

So try this followed by this.

And on the MVVM side of things I use the MVVM Light Toolkit, also try watching this very good video by Jason Dolinger

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top