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?
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With