有人可以確認我是否應該始終具有DataContract和Datamember屬性以用於操作參數和返回類型? 例如WCF操作參數和返回類型必須具有datacontract屬性(始終)?
ResponseMessage getOrderDetails(RequestMessage msg)
{
....
}
public class ResponseMessage
{
...
}
public class RequestMessage
{
...
}
感謝@Ladislav Mrnka,RequestMessage和ResponseMessage是自定義類。這些被認爲是POCO,並在WCF 4.0中默認序列化? –