[OperationContract]
[WebInvoke(UriTemplate = "createinvoice", Method = "POST", ResponseFormat = WebMessageFormat.Json, BodyStyle = WebMessageBodyStyle.Wrapped)]
public Invoice CreateInvoice(string instance)
{
// TODO: Add the new instance of SampleItem to the collection
try
{
string icode = instance;
//decimal paid = instance.AmountPaid;
return new Invoice() {InvoiceCode = icode };
}
catch(Exception)
{
throw new NotImplementedException();
}
}
每次我在上面說的瀏覽器中運行呢?另外當我去瀏覽器上做這個。它說沒有找到Endpoint。 (Mobile)是虛擬目錄,而(POS)是service1.cs的註冊路由在WCF REST服務不允許方法