title: how to update database from datagridview bound by linq query and entity model?
body: <p>I bind a datagridview from a linq query, but I don't know how to make it updated to database when users makes changes on the datagridview.</p>
  
  <pre><code>var q = from w in dowacodbEntities.worksheets
                      where w.ContractForm_id.Equals(g_ContractID)
                      orderby w.id
                      select new
                                 {
                                     w.id,
                                     w.UnitPrice,
                                     w.LabourCost
                                 };
              BindingSource bindingSource = new BindingSource(); // use bindingsource
              bindingSource.DataSource = q.ToList(); // convert linq query to bindingsource
              dataGridView1.DataSource = bindingSource; // add bindingsource to datagridview
  </code></pre>
  
  <p>p/s : I'm using C# winform</p>