title: MVC5 Ajax call to update database succeeds but table doesnt have new data
body: <p>I'm at about my wits end to this. I am new to MVC5 and trying to follow this tutorial on updating my database information with Ajax but I am running into too many issues.</p>
  
  <p>I have gotten to the point where my ajax call succeeds but nothing is inserted into my table.</p>
  
  <p>Database name: <code>Company123</code></p>
  
  <p>Table name: <code>Users</code></p>
  
  <pre><code>-----------------------------------------------------------
  ID          Name          Desk_Number          Access_Level
  -----------------------------------------------------------
  PRIMARY AI  NULL          NULL                 NULL
  </code></pre>
  
  <p>Then I created a class for my Database as the tutorial said</p>
  
  <pre><code>public class Company123
  {
      public int ID { get; set; }
      public string Name { get; set; }
      public double Desk_Number { get; set; }
      public double Access_Level { get; set; }
  }
  
  public class Company123Context : DbContext
  {
      public DbSet&lt;Company123&gt; Users { get; set; }
  }
  </code></pre>
  
  <p>Then as the tutorial suggested I created a controller named <code>Company123sController</code> using Entity Framework which leaves me this for the Update Method.</p>
  
  <pre><code>[HttpPost]
  public ActionResult Create([Bind(Include = "Name, Desk_Number, Access_Level")] Company123 company123)
  {
      if (ModelState.IsValid)
      {
          db.Users.Add(company123);
          db.SaveChanges();
          return RedirectToAction("Index");
      }
  
      return View(company123);
  }
  </code></pre>
  
  <p>Now on my <code>Index.cshtml</code> I have a script tag that is supposed to upload values via Ajax but it's not working.</p>
  
  <pre><code>&lt;script&gt;
  $('a').click(function (event) {
      event.preventDefault();
  
      $name = "John";
      $deskNumber = 12.5;
      $accessLevel = 45.5;
      $.ajax({
          url: '@Url.Action("Create", "Company123s")',
          data: { 'Name': $name, 'Desk_Number': $deskNumber, 'accessLevel': $accessLevel },
          type: "post",
          cache: false,
          success: function () {
              console.log("Success");
          },
          error: function (xhr, ajaxOptions, thrownError) {
              console.log(xhr, ajaxOptions, thrownError);
          }
      })
  })
  &lt;/script&gt;
  </code></pre>
  
  <p>Now I get "success" in the console but nothing is updated to my table.</p>
  
  <p><strong>Note:</strong></p>
  
  <p><em>I didn't use the real names of my info but it's all relative. If you see an odd name then I might have slipped up and forgot to change it but it should all up good, I double checked.</em></p>