WCF and interfaces on data contracts

前端 未结 2 1662
佛祖请我去吃肉
佛祖请我去吃肉 2020-12-01 12:53

While creating the WCF proxy using svcutil, is it possible to include the interfaces as well from which the data contracts inherit, e.g.:

public class SomeTy         


        
2条回答
  •  攒了一身酷
    2020-12-01 13:38

    You can inherit from the class implementing ISometype and add it to serialization using KnownType attribute:

    Can I force svcutil.exe to generate data contracts for a WCF service?

提交回复
热议问题