title: Entity Framework Insert record without "addto" method
body: <p>I'm new to EF. I have some code that successfully inserts a record in a table. However, it uses the autogenerated "addto..." method which I understand is depreciated. I've seen references to using the "add" method but am having trouble. Here is the code that works:</p>
  
  <pre><code>    Dim EntityContext As New DevEntities
      Dim log2 As New tblLog2
  
      log2.Error = "This is a test."
      log2.Date = System.DateTime.Now
      EntityContext.AddTotblLog2(log2)
      EntityContext.SaveChanges()
  </code></pre>
  
  <p>What is the "correct" way to insert this record (vb please)?</p>