Pergunta

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?

Foi útil?

Solução

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.

Outras dicas

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.

Yes you can extend the solution with new projects, no problem.

Its just a matter of knowing where to look in the LightSwitch rendition of the Visual Studio IDE.

This new LightSwitch framework is not like earlier ('closed') visual application builders such as MS Access. It is far more 'open' and far more based on Visual Studio and the full power of the .NET framework.

Its a perfect tool to enable non-professional developers to build simple apps, then 'evolve' into more full-on development in the Visual Studio environment.

Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top