How are you handling issue with using Lightswitch entities in Silverlight library with new project structure? (HTML Client preview 2) RRS feed

  • Question

  • Hi!
    I'm working on a Lightswitch project that is pretty large scale and use quite a lot of Silverlight UserControls with Commands, Behaviors etc. 

    I've been testing the HTML Client preview 2 and recently tried to upgrade the project to the new structure. But ran in to problems with my UserControl library having a reference to the Common-project which is removed. I've checked out the different threads about the subject (like http://social.msdn.microsoft.com/Forums/en-US/lightswitch/thread/838ee6ee-805b-429a-95f9-b6c29d0e223b) but I haven't found any answers. Is it even possible?

    Calling the server through OData and having my UserControls communicate directly with the server doesn't feel like a good workaround since the SL library will be totally isolated from the client project. I saw some real advantages with being able to share data between the client and my controls. If it's not possible to share the data I will have to make a decision if to put all my data access code in the client or in the library since I will otherwise be forced to duplicate code.

    I assume I'm not the only one with this issue but I'm curios of how you other people are dealing with this issue.

    And does anyone have information about future releases, will this still be an issue?

    I can see two ways this can be solved. Either Client project will be split up into two projects, one with data access and one with UI so you can reference the data access library from your silverlight controls or you can be able to put your usercontrols into the client library and use these in your screens. (It's kind of weird to me that you can't use usercontrols from your client library anyway...)

    Any input and suggestions for work arounds are greatly appreciated and I'm sticking with the old project structure in the mean time. Altho I would really like to be able to use the new ServerContext-object. :-\

    Saturday, March 2, 2013 8:51 AM