telerikwcf-ria-servicesvisual-studio-lightswitchvisual-studio-2013openaccess

WCF Service and LightSwitch using Telerik OpenAccess ORM - editing doesn't work, claims "Specified entity is not managed by a context"


I stumbled upon an issue after following the steps described in http://documentation.telerik.com/openaccess-orm/quick-start-scenarios/getting-started-root-quickstart-vs-light-switch-wcf-ria . I can generate the Model and the Service just fine and adding the DataSource to the Lightswitch project also proceeds without a problem.

If I afterwards create a Desktop client with a screen based on the OpenAccess Service, I can filter and view the data properly, but any attempt at editing or deleting existing records results in an error message stating "Specified entity is not managed by a context". Adding new records works alright (and the newly added records exhibit the same symptoms).

I'm working in Visual Studio 2013 and followed the steps from the Quick Start guide. Is there something I'm missing here? Did anybody succeed at getting a LightSwitch-editable Service from OpenAccess or is it some sort of a known issue that's not stated anywhere explicitly?


Solution

  • I posted the same question on the Telerik Forum and they admitted that they could reproduce this error but could not find any workaround at the moment. They added the issue to their Lighswitch integration roadmap but the timeframe for the fix is yet unknown.

    I solved the problem replacing Telerik OpencAccess ORM with classic WCF RIA Service solution (according to the tutorial: http://www.c-sharpcorner.com/UploadFile/raj1979/how-to-use-wcf-ria-service-in-lightswitch-2012/ ). I also had to switch to Visual Studio 2012 to be able to create a Domain Service Class.

    Summing up, I had to change some tools but everything works perfectly now.