-
Notifications
You must be signed in to change notification settings - Fork 91
Open
Labels
Description
Hi,
I have this API Controller in ASPNET MVC:
public void Post([FromBody] Request request)
//...
with this request model:
public class Request
{
public int ScenarioLocationID { get; set; }
public int StoreLocationID { get; set; }
public int VersionID { get; set; }
public Dictionary<string, string> Properties { get; set; }
}
But when I try to do the following in Javascript. The Properties
property has always a length of 0. Before I used the webapiproxy generator it worker ok.
var properties = {};
ko.utils.arrayForEach(self.properties(), function (impactProperty) {
properties[impactProperty.name] = impactProperty.value;
});
var request = {
VersionID: self.versionID,
ScenarioLocationID: self.scenarioLocationId(),
StoreLocationID: self.storeLocationId(),
Properties: properties
};
$.proxies.controller.post(request).done(function (data) {
//...
Thanks in advance,
Evert