Problem with WCF and multiple namespaces - sharing object types across multiple service references

后端 未结 4 837
闹比i
闹比i 2021-01-13 09:53

i have two web services. One with user functionality, one with admin functionality.

Both services effectively work with the same object types, for instance:

4条回答
  •  孤独总比滥情好
    2021-01-13 10:20

    There is an easy way to share types between client and service, just by adding reference to shared type assembly to your client BEFORE adding the service reference.

    You can find the detailed scenario and sample project there:

    http://blog.walteralmeida.com/2010/08/wcf-tips-and-tricks-share-types-between-server-and-client.html

提交回复
热议问题