I recently started to deal with WCF and wondered if it is possible to somehow avoid copy-paste interfaces from a solution server to a client solution?
- oneTake to the assembly and reuse it? - Monk
- 2to arrange interfaces with a separate project and put a link to it from the server and from the client? - tym32167
- oneWhat other copy-paste? Where does he come from? Classes / interfaces on the client are automatically generated based on the wsdl schema. And in general, the server is written in one language, completely independent of the clients. And clients can be written in completely different languages by other people who do not have access to the server code. - Alexander Petrov
- The @AlexanderPetrov copy-paste is there when the client and server are written in the same language by the same people. tym32167 and Monk are right, this is decided by moving the contracts into a separate project. Constantly update the code generated by wsdl, I personally did not like it, it's easier to take out and less code in the code. And for third-party clients, wsdl generation in any language, here you are absolutely right. - rdorn
|