title: How do I save my object back into my database in LINQ to SQL?
body: <p>With <a href="http://en.wikipedia.org/wiki/Language_Integrated_Query#LINQ_to_SQL" rel="noreferrer">LINQ to SQL</a> in a ASP.NET MVC website I can display objects (records) from my database table.</p>
  
  <p>Now I would like to create a new object and save it back to the database.</p>
  
  <p>In my Controller, I do this:</p>
  
  <pre><code>    var dataContext = new MessageDataContext();
      Message message = new Message();
      message.Action = "save";
      message.Body = "record";
      message.Parameter = "234";
  </code></pre>
  
  <p>And now I want to SAVE it with something like this:</p>
  
  <pre><code>message.Save();
  </code></pre>
  
  <p>Or perhaps:</p>
  
  <pre><code>dataContext.SubmitChanges(message);
  </code></pre>
  
  <p>But neither of these work.</p>
  
  <p>What is the syntax here to:</p>
  
  <ul>
  <li>add new objects and save them to the database?</li>
  <li>make changes on existing objects and save them to the database?</li>
  </ul>