JS:
$http.post("/api/Checkout/SaveOrderOption", { OrderOption: OrderOption })
C#
[HttpPost]
public void SaveOrderOption(object OrderOption)
{
_Logger.Trace(OrderOption.ToJSON());
}
It is really weird. If I just object, I can get the correct raw json string i post.
{"OrderOption":{"xxxx":"xxx","www":true,"yyy":true}}
but if I change the type to a specific type, it doesn't work.
The data of the object becomes default value instead of the value I post.
I tried [FromBody], it doesn't work either.