You should make use of the ModelBinding features of ASP.NET MVC to get the User instance directly
Restructure your Action to
[POST("Create")]
public ActionResult Create(User user)
{
BLResult bLResult = AccountingBL.CreateAccount(user);
result.Script = JsonConvert.SerializeObject(bLResult);
return result;
}
where User
is of the form . Make sure that User has a no argument constructor
public class User {
public string Name {get;set;}
public string Password {get;set;}
public string Email {get;set;}
}
And Send the data to the POST as
var user = {"Email":"foo@foo.com","Password":"123456","Name":"Halil İbrahim"}
$.ajax({
.... other details
data : user
}