Click here to Skip to main content
15,891,033 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I am using odata controller in mvc.
While i am sending json data from ajax post method controller takes null value for properties of class

my code like

{"Id":"DdZLFwNe7vQ"
,"ExternalInvestorId:"F1/11/Y14",
"AppKey":"5BB9B50E-AA2C-498B-B895-1E83827CE9F5",}

in odatacontroller post method

public void Post([FromBody]InvestorUpdate Inv)
{

}

public class InvestorUpdate
{
public string Id { get; set; }
public string ExternalInvestorId { get; set; }
public string AppKey { get; set; }
}

Inv takes null value for its three properties
Posted
Updated 12-Feb-14 0:20am
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900