Skip to content

Operations.Count() is always 0 #105

@chriscfox

Description

@chriscfox

Please can you help:

I have implemented my controller action as
[HttpPatch]
[Authorize]
[Route("Projects/{projectID}/Insights/{id}")]
public ActionResult InsightPatch (Guid projectID, Guid id, JsonPatchDocument patchData)
{
... some stuff...
}

I then call into this using JQuery, like so:
var patch = [{ "op": "replace", "path": "/title", "value": "some string value" }];
$.ajax({
url: "/Projects/" + $(this).parents("form").find("#ProjectID").val() + "/Insights/" + $(this).parents("form").find("#ID").val(),
data: JSON.stringify( patch ),
type: 'PATCH',
contentType: 'application/json',
success: () => { console.log("PATCH Submitted"); }
});

However, Operations.Count() is always 0 in the controller action. I am targetting .Net Framework 4.6.1

Can anyone please help?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions