我想像这样使用操作合同创建 WCF Rest 服务
public interface ICustomerService
{
[OperationContract]
[WebInvoke(Method = "GET", RequestFormat = WebMessageFormat.Json,
ResponseFormat = WebMessageFormat.Json, UriTemplate = "/GetAllCustomer/")]
List<CustomerDataContract> GetAllCustomer();
[OperationContract]
[WebInvoke(Method = "GET", RequestFormat = WebMessageFormat.Json,
ResponseFormat = WebMessageFormat.Json, UriTemplate = "/GetSTOCK/ABC")]
List<CustomerDataContract> GetSTOCK();
[OperationContract]
[WebInvoke(Method = "GET", RequestFormat = WebMessageFormat.Json,
ResponseFormat = WebMessageFormat.Json, UriTemplate = "/GETSUPINFO/XYZ/ABC")]
List<CustomerDataContract> GETSUPINFO();
}
任何人都可以帮忙吗?
慕无忌1623718
相关分类