title: Post a JSON object to an MVC controller and retrieve an IEnumerable type
body: <p>I want to retrieve a JSON from my AJAX, which is in the form of </p>
  
  <pre><code>{ID_USER : ID_INSTRUCTION}
  </code></pre>
  
  <p>My JSON result :</p>
  
  <pre><code>[{"658":"81"},{"658":"82"},{"658":"90"},{"658":"101"}]
  </code></pre>
  
  <p>This my code jQuery for post AJAX: </p>
  
  <pre><code>$("#boutton-add").on('click',function (e) {
      e.preventDefault();
      var newFormData = [];
      var usr = $('.usr_id').attr('id');
      jQuery('.tab_inst tr[name="inst"]').each(function (i) {
          var tb = jQuery(this);
          var obj = {};
          tb.find('button[name="delete"]').each(function () {
                  obj[usr] = this.id;
          });
          if (obj[usr] != null)
              newFormData.push(obj);
      });
      var jsonresult = JSON.stringify(newFormData); // object return instruction of user after removing and adding informations 
  
      //alert(jsonresult);
  
      //----------------------ajax to posting json to actionresult
  
      $.ajax({
          type: 'POST',
          url: '/Usr_Inst/set_user_inst/',
          contentType: 'application/json; charset=utf-8',
          dataType: 'json',
          data: jsonresult,
          traditional: true,
          success: function (data) {
              alert(jsonresult);
          }
      });
  });
  </code></pre>
  
  <p>now all things gone right.</p>
  
  <p>Now I want to make adding or removing programs from my USER_INSTRUCTION table that has two columns ID_USER and ID_INSTRUCTION, to do this I need an ActionResult method that has a parameter <code>IEnumerable &lt;USER_INSTRUCTION&gt;</code>.</p>
  
  <pre><code>public ActionResult set_user_inst(IEnumerable&lt;USER_INSTRUCTION&gt; jsonresult)
  {
      // adding or removing programs.
  }
  </code></pre>
  
  <p>My Model class is like :</p>
  
  <pre><code>[Table("DPH.USER_INSTRUCTION")]
  
  public partial class USER_INSTRUCTION
  {
      [Key]
      public decimal ID_USER { get; set; }
      public decimal ID_INSTRUCTION { get; set; }
  
      public virtual INSTRUCTION INSTRUCTION { get; set; }
      public virtual USERS USER { get; set; } }
  </code></pre>
  
  <p>Values that I got from MVC controller in parameter when the project is running is <code>ID_USER = 0 an ID INSTRUCTION = 0</code></p>