Inheriting from a generic contract in WCF

后端 未结 3 1057
遥遥无期
遥遥无期 2021-01-12 12:13

More WCF woes... :)

All my workflows implement the same 3 methods. After a lot of copy and paste, I decided to make them inherit from the same interface:

<         


        
3条回答
  •  感动是毒
    2021-01-12 12:38

    Why don't you specify a name for your contract in the ServiceContract attribute:

    [
    ServiceContract
       (
        Namespace = "http://schema.company.com/messages/", 
        Name="MyBasicContract"
        )
    ]
    

    If you don't explicitlly specify a name, it will default to the qualified name of your interface in "that weird syntax that .NET uses".

提交回复
热议问题