【发布时间】:2011-11-18 08:15:19
【问题描述】:
我的 WCF-RIA DomainService 有一个如下所示的插入方法:
public void InsertWidget(WidgetDef widgetDef)
class WidgetDef
{
[Key]
int widgetID;
string title;
int x;
int x;
// there are more properties, but I think you get the idea...
}
要通过 JSON 端点访问它,我想我需要将变更集发布到 url:
[serverURL][namespace]WidgetService.svc/json/SubmitChanges。
我很确定我的 URL 是正确的,因为我的请求到达了 WidgetService.Initialize 方法,但随后我在服务器中得到了一个异常 - 这并不奇怪,因为我不知道请求的内容是什么应该是这样的。
我的问题:插入操作的 HTTP 请求内容的 (JSON) 格式是什么?
【问题讨论】:
标签: json rest wcf-ria-services domainservices