When Debugging the MVCcontroller, all the properties of eventDetails are null, although from the client side the properties have values
Ajax Call
$.ajax({
type: "POST",
url: "/Home/schedule",
data: {
EventDetailsId: 1,
Location: scheduleData.location,
EventName: scheduleData.title
},
contentType: 'application/json',
success: function (data) {
alert(data);
},
error: function () {
alert("Error occured!!")
}
});
EventDetails Class
public class EventDetails
{
public int EventDetailsId{ get; set; }
public string Location { get; set; }
public string EventName { get; set; }
}
Post Call
[HttpPost]
public JsonResult Schedule(EventDetails eventDetails)
{
return Json(new { status = true });
}

