I want to post an JavaScript object from AngularJS to C# Api The simple type is posted but not object et Array of object
var event = { dateDebut: dateDebut, heureDebut: heureDebut, heureFin: heureFin, invites: invites,// Array Of Object titreRdv: titreRdv, userEmail: EmailGoogle } $http.post(CreateRdvPath, event) .success(function (data) { // Success code }) .error(function (data) { // Error code });
My C# Controller function
[HttpPost] public string createRdv(CalendarEvent MyEvent) { }
CalendarEvent
public class CalendarEvent { private string dateDebut, heureDebut, heureFin, titreRdv; private string userEmail; private List<Utilisateur> invites; }