title: Update rows from grid and database with Kendo UI and MVC
body: <p>I'm using a <strong>MVC project</strong> with <strong>Visual Studio 2012 and Kendo UI 2014.</strong></p>
  
  <p>I <strong>can update a row from the grid</strong> and it changes, but when I reload the page, the row appears with the original info. I would like to <strong>update it in the database too</strong>.</p>
  
  <p>This is my code:</p>
  
  <p><strong>.cshtml (View):</strong></p>
  
  <pre><code>&lt;div class="grid"&gt;
  @(Html.Kendo().Grid&lt;UsersModel&gt;()
      .Name("grid")
      .Editable(editable =&gt; editable.Mode(GridEditMode.InCell))
      .DataSource(dataSource =&gt; dataSource
          .Ajax()
          .Model(r =&gt; r.Id(p =&gt; p.Id))
          .Read(r =&gt; r.Action("GetAccounts", "ManagerAccounts", new { area = "Admin" }))
          .Destroy("Delete", "ManagerAccounts")
          .Update("Update", "ManagerAccounts")
          .Create("Create", "ManagerAccounts")
      )
      .Columns(columns =&gt;
      {
          columns.Bound(c =&gt; c.Id);
          columns.Bound(c =&gt; c.UserName);
          columns.Bound(c =&gt; c.Email);
          columns.Command(command =&gt; command.Destroy()).Width(120);
      })
      .Pageable(pageable =&gt; pageable
          .Refresh(true)
          .PageSizes(true)
          .ButtonCount(5)
      )
      .Sortable()
      .Navigatable()
      .ToolBar(toolbar =&gt; {
          toolbar.Create();
          toolbar.Save();        
      })
  )
  &lt;/div&gt;
  </code></pre>
  
  <p><strong>Controller:</strong></p>
  
  <pre><code>[AcceptVerbs(HttpVerbs.Post)]
  public ActionResult Update([DataSourceRequest] DataSourceRequest request, IEnumerable&lt;UsersModel&gt; users)
  {
      if (users != null &amp;&amp; ModelState.IsValid)
      {
          foreach (var user in users)
          {
              AccountRepository.UpdateUsuarios(user);
          }
      }
  
      return Json(ModelState.ToDataSourceResult());
  }
  </code></pre>
  
  <p><strong>Repository (AccountRepository):</strong></p>
  
  <pre><code>public void UpdateUsuarios(UsersModel user)
  {
      var usuario = this.Context.Users.Where(l =&gt; l.Id == user.Id).FirstOrDefault();
  
      if (usuario != null)
      {
          usuario.Id = user.Id;
          usuario.UserName = user.UserName;
          usuario.Email = user.Email;
          this.Context.SaveChanges();
      }
  }
  </code></pre>
  
  <p>I tried with <code>this.Context.SaveChanges();</code> but it doesn't work.</p>