1
我有一個經營合同,看起來像這樣在服務器上:
[OperationContract]
[WebInvoke(Method = "POST", UriTemplate = "/RegisterOrganization", RequestFormat = WebMessageFormat.Json,
ResponseFormat = WebMessageFormat.Json, BodyStyle = WebMessageBodyStyle.Bare)]
void RegisterOrganization(Organization organization, User admin);
現在在客戶端我有以下資源:
var RegisterOrganization = $resource(baseUrlService.getBaseUrl() + 'REST/Organization.svc/RegisterOrganization');
我的問題是如何傳遞兩個對象作爲這樣的參數:
RegisterOrganization.save(organization,admin)
我做得到一個500服務器錯誤它是這樣的,任何想法我怎麼能做到這一點?