views:

36

answers:

2

I just referenced my application domain layer dll to the new WCF service that I am creating.

On my initial tests I am able to use and return the objects from my domain layer on the WCF service.

Question that come in my mind is none of my domain claseses have [DataContract] attribute so does this create a limitation or problem for me that I should be aware of? Or any other concerns that I should know when using other class library in a WCF project?

+1  A: 

You can either use DataContract or Serializable. If you use serializable you need to reference the dll with the types from both the server and the client. This is Ok when you have control of both, but can be a problem if other people want to access your service.

Take a look at this video for a better way of doing it than standard Visual Studio:

http://www.dnrtv.com/default.aspx?showNum=122

Shiraz Bhaiji
+1 for the video reference. I've been converted to manual proxy generation based on Miguel's advice.
Matt Davis
+1  A: 

First law of distributed object design : don't distribute your objects. But if you really want because you create a data oriented application, .NET Ria Services is what you want.

Nicolas Dorier