I have an example which sends a JSON post request to MVC controller. This example works in ASP.NET 4.5 but won’t work in the newest ASP.NET 5 release. Do I miss anything in this example?

1. I created a model, but I didn’t bind it to database. It will be just the object created in the memory. 

```
public class SalesOrder
{
    public int SalesOrderId { get; set; }
    public string CustomerName { get; set; }
    public string PONumber { get; set; }
}

```
2. I use Visual Studio 2015 to create that model based controller and its associated CRUD views. However, in this example, I will only run the “Create” view.
3. Inside the controller, I hard coded a SalesOrder object list and it only contains an item. I will use it to work with the CRUD views.

```
private List<SalesOrder> salesOrderList = 
    new List<SalesOrder> ( 
        new SalesOrder[] 
        { 
            new SalesOrder() 
                { 
                     SalesOrderId = 1, 
                     CustomerName = "David", 
                     PONumber = "123" 
                } 
        });

```
4. Inside the controller, I also create a new function to process the “Save” request. The request will just change the CustomerName property of the model then bounce back with the JSON result.

```
[HttpPost]
public JsonResult Save(SalesOrder salesOrderViewModel)
{
    salesOrderViewModel.CustomerName = "David returns";

    return Json(new { salesOrderViewModel });
}

```
5. In the Create.cshtml, I created a button and attach JQuery script to its click event.

```
<p><button id="saveButton">Save</button></p>

```

This is the JQueryScript.

```
    $(function () {
        var clickFunc = function () {

            var salesOrderViewModel = {
                    "salesOrderViewModel": {
                    "SalesOrderId": 123,
                    "CustomerName": "ab",
                    "PONumber": "2",
                    }
            }

            $.ajax({
                    url: "/SalesOrders/Save/",
                    type: "POST",
                    cache: false,
                    data: JSON.stringify(salesOrderViewModel),
                    contentType: "application/json; charset=utf-8"
                });
            }

        $('#saveButton').click(clickFunc)
    })

```

6. I click the "Save" button in Create.cshtml to trigger the post request.
7. I set the debug break point in the controller and verify the coming post request. In ASP.NET 4.5, the JSON deserialization is working, and it shows all the values.

However, in ASP.NET 5, an empty object is returned.

In ASP.NET 5 case, if press F12 to start the debugger in Microsoft Edge, then it shows the Post request does have the correct values, but for some reasons, they are not passed to MVC controller.

Please see these screen shots:
<http://i63.tinypic.com/68vwnb.jpg>

Do I miss anything? 
Thanks for helping…