title: Linq SQL update error: cannot resolve symbol
body: <p>I try to make update in SQL db and get error</p>
  
  <p>Use official documentation from  <a href="http://msdn.microsoft.com/en-us/library/bb399339.aspx" rel="nofollow noreferrer">http://msdn.microsoft.com/en-us/library/bb399339.aspx</a> </p>
  
  <pre><code>var query =
  from ord in db.Orders
  where ord.OrderID == 11000
  select ord;
  
  foreach (Order ord in query)
  {
  ord.ShipName = "Mariner";
  ord.ShipVia = 2;
  }
  db.SubmitChanges();
  </code></pre>
  
  <p>And also try from <a href="https://stackoverflow.com/questions/909960/update-using-linq">Update using LINQ to SQL</a></p>
  
  <pre><code>using(var ctx = new FooContext()) {
  var obj = ctx.Bars.Single(x=&gt;x.Id == 1100);
  obj.SomeProp = 123;
  ctx.SubmitChanges();
  }} 
  </code></pre>
  
  <p>Why is an error ?</p>
  
  <pre><code>ord.ShipName
  Cannot resolve symbol 'ShipName'
  
  
  var obj = ctx.Bars.Single(x=&gt;x.Id == id);
  
  Cannot resolve symbol 'Id'
  </code></pre>