750
99.9
Sep 28, 2010
Praveen:
This is a nice WCF feature. You can decorate your classes in the BO with attributes like [DataMember] and [DataContract] that allow you to specify the names of the generated proxy classes on the client.
Hope this helps.
50
50
Sep 29, 2010
Thanks Dan, So in the above code Product is referring to ProductDto in service layer and not Product in Business Layer.
Snippet
[DataContract(Name = "Product", Namespace = "http://www.yourcompany.com/types/")]
public class ProductDtoAlso as in the example, if Data Access object does not have any methods, do we need separate Dto objects if we move Data Access objects to separate project. I am working on a project where business logic is implemented in service layer implementation, client makes call on Facade and it calls service layer.
Praveen.
750
99.9
Sep 29, 2010
Praveen:
Yes, you are right, the attributes are on the DTOs rather than the BOs.
Also, separating your Facade, Service Layer, Business Layer and Data Access Layer into separate projects is very much a matter of your particular requirements and/or preferences.