A common problem when developing Silverlight applications is how to share classes and in particular (Entity Framework) entities which are compiled for the full .NET framework in a Silverlight application. Silverlight is a browser plugin and a platform independent subset of the full .NET framework. Therefore Visual Studio does not allow referencing .NET assemblies from your Silverlight application.
Fortunately there is a very simple technique to share and reuse source code. Full details of which you can find in the link below
http://www.scip.be/index.php?Page=ArticlesNET28&Lang=EN
In this article Stefan Cruysberghs demonstrated this technique with several real world examples and I will give you some handy tips.
- Referencing assemblies
- Linking files in Silverlight assemblies
- Using the SILVERLIGHT compiler directive
- Sharing code between WPF and Silverlight
- Sharing (POCO) entities between your .NET domain layer and Silverlight
- Sharing extension methods between .NET and Silverlight
- Sharing logic in your Entity Framework entities between your .NET domain layer and Silverlight
- Sharing common logic and separating framework dependent implementations
This linked has helped me, as I have SOA, where WCF Services, DataContracts, ServiceContracts are shared between my ASP.NET , WPF and Silverlight application.
0 comments:
Post a Comment