Question

I have a wcf service where I do some business specific processes. I use this service from a mvc3 web application. since I'm still in development process I change my web service a lot by adding new methods or changing the signatures of methods. then I need to update my service reference on web application, but as far as I understand when I do that the reference class gets created from the scratch. problem here, that I want to add some logic into service reference. but in this case each time I update the service reference, additional parts that I've added gets lost, and I need to manually copy paste and adjust my code. What is the right way of going around this issue?

Was it helpful?

Solution

Using a partial class, or deriving a class from the service reference and adding all the custom logic in that class will provide the ability to updating the service reference while keeping the custom code. This approach looks very neat to me. Thanks for the ideas.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top