title: Getting "The entity type <model> is not part of the model for the current context."
body: <p>I am having this issue updating my database 1 column at a time in asp.net using web api. I am trying to query a PUT to just update one value in the row instead of updating that one and setting the rest to null. I made a separate model outside of the controller to take in the update so I could do one at a time. When I hit this line <code>db.Entry(user).State = EntityState.Modified;</code> in the controller that is where it is erroring out. Any advice how I can fix this?</p>
  
  <p>This is my separate ViewModel I am taking in in the put method:</p>
  
  <pre><code>namespace WebAPI.Models.ViewModels
  {
      public class UserViewModel
      {
          public string FirstName { get; set; }
          public string LastName { get; set; }
      }
  }
  </code></pre>
  
  <p>This is my controller calling in the method with the ViewModel in my parameter:</p>
  
  <pre><code>public HttpResponseMessage PutUser(int id, UserViewModel user)
          {
              HttpResponseMessage response;
  
              if (db.User.IsInRole("Admin"))
              {
                  try
                  {
                          db.Entry(user).State = EntityState.Modified;
                          db.SaveChanges();
                  }
                  catch (DbUpdateConcurrencyException)
                  {
                      if (!UserExists(id))
                      {
                          response = new HttpResponseMessage(HttpStatusCode.NotFound);
                          return response;
                      }
                      else
                      {
                          throw;
                      }
                  }
  
                  response = new HttpResponseMessage(HttpStatusCode.NoContent);
                  return response;
              }
  </code></pre>
  
  <p>This is my <code>DBContext</code> file:</p>
  
  <pre><code>public partial class Entities : DbContext
      {
          public Entities()
              : base("name=Entities")
          {
          }
  
          protected override void OnModelCreating(DbModelBuilder modelBuilder)
          {
              throw new UnintentionalCodeFirstException();
          }
          public virtual DbSet&lt;User&gt; Users { get; set; }
      }
  }
  </code></pre>