title: How do I add a record to a database with LINQ?
body: <p>I have been utilizing <a href="http://weblogs.asp.net/scottgu/archive/2007/05/19/using-linq-to-sql-part-1.aspx" rel="nofollow noreferrer">Scott Gu's tutorials on LINQ to SQL</a> to try to learn some LINQ.  I have been able to view, retrieve, and update records but I am unable to write new records into the database (MSSQL). Scott starts getting into inserting rows in the <a href="http://weblogs.asp.net/scottgu/archive/2007/07/11/linq-to-sql-part-4-updating-our-database.aspx" rel="nofollow noreferrer">fourth section</a> of the set of tutorials. As you can see on that page (or may already know), in order to add a record you must do the following (VB.NET):</p>
  
  <pre><code>Dim db as New LINQtoSQLDataContext
  
  Dim oArticle as New article // table name
  oArticle.Body = "Some Text"
  oArticle.Title = "Some Title"
  oArticle.Author = "Some Author"
  
  db.articles.Add(oArticle) // this is the line that does not work.
  </code></pre>
  
  <p>Visual Studio 2008 returns me "<code>'add' is not a member of 'System.Data.Linq.Table(Of article)</code>".</p>
  
  <p>Can anyone give me a push in the right direction? Thanks!</p>