I have not found a way to update a .Net domain service after I changed the underlying entity model.

So when there are changes to the model I create a new domain service as workaround and copy my properties/methods from my old domain service to it.

Is there any easier and maybe less error prone way?

Comments

Is this WCF RIA Services with siverlight? if so please tag as such

Written by Ian Ringrose

@Ian Ringrose As far as I know this applies to every application using Ado.Net. In fact in my case I work on an offline WPF application.

Written by Amenti

Accepted Answer

Well, the best thing I found are partial classes. In addition to the automatically created DomainService.cs I add a DomainServiceProtected.cs where my implementations I don't want to have overwritten every time something changes in the entity model reside.

Written by Amenti
This page was build to provide you fast access to the question and the direct accepted answer.
The content is written by members of the stackoverflow.com community.
It is licensed under cc-wiki