views:

154

answers:

3

I have no idea how to do this simple task. LightSwitch's Solution Explorer is different in the sense that it doesn't allow to add other projects such as Class Library. Even if I could add a Class Library I would still need to reference the data model from it. As the data model is inside the LightSwitch project I would have a circular reference.

I didn't like this architecture of LightSwitch. I think the data model generated by the designer should be placed in a separate assembly. I also think the Solution Explorer should allow multiple projects so that I could create a business logic assembly, reference the data model and reference the business logic assembly from the LightSwitch project.

As the world is not the way I think it should be, how do I do this?

+3  A: 

You can create a separate project that contains WCF Ria Services for the LightSwitch project to use as it's data source. You can then set the Ria Services up almost anyway you want, implementing any Business Logic you'd like.

Jeff Sheldon
+3  A: 

In the Soulution Explorer there is a drop-down on the top to switch from Logical View (what you initially see) to File View (this will show the project/file structure.) Once you have done that you can add assembly references as appropriate. After you have done that switch back to the Logical View and then add your own validation logic to entities/fields/etc.

Brett