Search code examples
silverlightentity-frameworkdomainservices

How can I modify edmx and reflect changes in the domainservice automatically?


I have a silverlight business application created with vs2010 and it is RIA service enabled, I added new table in the database and updated the edmx using (update model from database option), but I want to update the domain service class as well to include the new tables, how can I do that?


Solution

  • I haven't found a way to do this automatically, but this blog seems helpful. EDIT: If you use partial classes as suggested, then you can delete the DomainService1.cs class and use add new item to add the class again. Then using the built in wizard, re-check the entities you want to expose. The partial classes will hold your custom logic.