Work with WCF, Windows Phone 7 and ASP.Net

I tried to create a small test application.

My goal is to access the database using the wcf service, have a class library for data objects and use this library for the ASP.Net web page and for Windows Phone 7.

Is it possible? My current problem is creating a library that I can use for WP7 and my WCF service. It is not possible to reference the C # class library to a WP7 application, and it is not possible to reference the WP7 Silverlight library to my WCF service.

What a better way to go. I will avoid the code twice for my ASP.Net webpage and for the WP7 application.

Thanks for the tips.

Greetings Andy

+3
source share
1 answer

Create two separate libraries, but split the source between them. Create the first library, then add the existing file in the second library. On the Add button, click the small down arrow and select Add As Link.

This will allow you to create 2 libraries with your dependencies / links. You will need to know the namespaces that you use in your code, and what is available on each platform, since not all will be available in both.

+1
source

Source: https://habr.com/ru/post/1758680/


All Articles