title: Updating a single row in linq
body: <p>I'm trying to update a single row of a table, specifically using a primary key value using linq.</p>
  <pre><code> var mytab = new Customer();
   mytab.FirstName = mymodel.FirstName;
   mytab.LastName = mymodel.LastName;
   mytab.CustomerId = mymodel.CustomerId;
  
   db.AddToCustomer(mytab);
   db.SaveChanges()
  </code></pre>
  <p>This adds a new row with a new id. Stepping through the code reveals that <code>mymodel</code> is passing the correct values with a first or last name that I want to update.</p>
  <p>The <code>mymodel.CustomerId</code> is the correct id of the record I want to update but SQL Profiler shows I'm not updating anything.  Do I need to use .First ?</p>