views:

36

answers:

2

Is it possible to expose a .NET (class) library through a WCF Data Service ? Makes this scenario sense ? Or is the usage of pure WCF the best and only way in this case ?

Background: I have several (old) C# classlibraries (which encapsulate the access to different datasources), which I want to use with Ajax and Silverlight. I cannot and should not access directy to the datasources and have to use the libraries (because of backward compatibility).

+2  A: 

Its worth noting that the XML serialization of objects does not conform to the OO constructs you have in code, ie XML has no notion of inheritence. If your class library is complicated in this regard, I would advise against it.

Can you not create an independent service that simply uses your class library underneath? By this I mean creating a new service and service interface, not turning your class library into a service interface.

Adam