title: Error "Invalid JSON primitive: models." on Kendo Grid datasource while passing model to controller
body: <p>Getting error while implementing Kendo Grid inline edit CRUD. When I add a new record and update it, I receive response code 500 with error:</p>
  
  <p>I believe the problem is coming from <code>parameterMap</code>. What is the correct way to pass the model to the controller in Kendo?</p>
  
  <blockquote>
    <p>Invalid JSON primitive: models.</p>
  </blockquote>
  
  <p>What are the models?</p>
  
  <p><strong>Source Code:</strong></p>
  
  <pre><code>$(document).ready(function () {
          var baseUrl = "/SomeUrl",
              dataSource = new kendo.data.DataSource({
                  transport: {
                      read: {
                          url: baseUrl + "/GetAccolades?profileId=" + @profileId,
                          type: "GET",
                          dataType: "json"
                      },
                      create: {
                          url: baseUrl + "/AddAccolade",
                          type: "POST",
                          dataType: "json",
                          contentType: "application/json",
                      },
                      update: {
                          url: baseUrl + "/UpdateAccolade",
                          type: "PUT",
                          dataType: "json",
                          contentType: "application/json",
                      },
                      delete: {
                          url: baseUrl + "/DeleteAccolade",
                          type: "DELETE",
                          dataType: "json"
                      },
                      parameterMap: function (options, operation) {
                          if (operation !== "read" &amp;&amp; options.models) {
                              alert(kendo.stringify(options.models));
                              return { models: kendo.stringify(options.models) };
                          }
                      }
                  },
                  batch: true,
                  schema: {
                      model: {
                          id: "ProfileAccoladeID",
                          fields: {
                              ProfileAccoladeID: { editable: false, nullable: false },
                              ProfileID: { editable: false, nullable: false, defaultValue: @profileId  },
                              Years: { type: "string" },
                              Name: { type: "string" },
                              Level: { type: "string" },
                              Event: { type: "string" },                              
                          }
                      }
                  }
              });
  
          $("#accolades-grid").kendoGrid({
              dataSource: dataSource,
              pageable: false,
              height: 550,
              toolbar: ["create"],
              columns: [
                  { field: "Years", width: "150px" },
                  { field: "Name", title: "Name", width: "150px" },
                  { field: "Level", title: "Level", width: "150px" },
                  { field: "Event", title: "Event", width: "450px" },                    
                  { command: ["edit", "destroy"], title: "&amp;nbsp;", width: "250px" }],
              editable: "inline"
          });
      });
  &lt;/script&gt;
  </code></pre>
  
  <p>Controller method:</p>
  
  <pre><code>    [HttpPost]
      public JsonResult AddAccolade(ProfileAccolade accolade)
      {
          using (var db = new XXXEntities())
          {
              if (accolade != null)
              {
                  var newAccolade = new ProfileAccolade()
                  {
                      ProfileID = accolade.ProfileID,
                      Years = accolade.Years,
                      Name = accolade.Name,
                      Level = accolade.Level,
                      Event = accolade.Event
                  };
                  db.ProfileAccolades.Add(newAccolade);
                  db.SaveChanges();
  
                  return Json(new { Success = true });
              }
              else
              {
                  return Json(new { Success = false, Message = "Error occured" });
              }
          }
      }
  </code></pre>
  
  <p>How do I fix this error?</p>
  
  <p><strong>Update:</strong></p>
  
  <p>By removing <code>contentType: "application/json",</code> the error <code>Invalid JSON primitive: models.</code> is gone. However, the controller does not get the model.</p>
  
  <p>Any ideas to fix this?</p>