title: Mvc Core Post String Value
body: <p><strong>Question</strong>: Can we bind without the use of a model and just purely based on the parameter names of the <code>IActionResult</code> method. From the below I am posting a single <code>string</code> to the end point, however it is wrapped in a object with a property of <code>reviewNotes</code>. I have a work around at the moment, which is explained below.</p>
  
  <p>I have setup the end point llike so.</p>
  
  <pre><code>    [HttpPost("updateassetnotes/{id}")]
      public IActionResult UpdateAssetNotes(int id, [FromBody]string reviewNotes)
      {
          _dataMapper.UpdateAssetNotes(id, reviewNotes);
          return ApiSuccess("Updated Review Notes");
      }
  </code></pre>
  
  <p>And the client side is posting like this.</p>
  
  <pre><code>    var url = "/api/cataloguing/updateassetnotes/" + id;
      var data = { reviewNotes: self.assetReviewNotes() };
  
      $.ajax({
          type: 'POST',
          url: url,
          data: JSON.stringify(data),
          contentType: 'application/json'
      }).done(function (resp) {
  
      }).fail(function (resp) {
  
      }).always(function () {
  
      });
  </code></pre>
  
  <p>However if I change the data to:</p>
  
  <pre><code>    var data =  self.assetReviewNotes();
  </code></pre>
  
  <p>Then the review notes string is actually populated. As mentioned this is the work around im using at the moment. As previously mentioned I could create a simple model like the below and use this in the end point to bind the string. Im just wondering if there is a way to bind directly to the primitive types.</p>
  
  <pre><code>public class SimpleModel {
      public string ReivewNotes {get;set;}
  }
  </code></pre>