title: LINQPad "The name SubmitChanges does not exist"
body: <p>Working with LINQPad 5 on virtual machine win 10. Select queries work, now I try to use update query and it gives me an error about SubmitChanges() method.</p>
  
  <blockquote>
    <p>CS0103 The name 'SubmitChanges' does not exist in the current context.</p>
  </blockquote>
  
  <p>Basically all answers that I found are like this: write SubmitChanges() or SaveChanges()  if you are using EF. Also I tried to change from C# Statements to C# Program. </p>
  
  <p><a href="https://stackoverflow.com/questions/18438924/how-to-submit-changes-in-linqpad">How to submit changes in LinqPad</a></p>
  
  <p>In one answer user might not add a connection, which I did. (screen 1)
  <a href="https://stackoverflow.com/questions/7388318/linqpad-global-function-submitchanges-not-found">LINQpad: Global function SubmitChanges not found</a></p>
  
  <p>Then I tried to pass a "this" to a method, and in my case "this" is an UserQuery, not a DataContext. (screen 2) Which is wierd. </p>
  
  <p><a href="https://stackoverflow.com/questions/8355686/linqpad-submitchanges-extension">linqpad - SubmitChanges Extension</a></p>
  
  <pre><code>void Main()
  {
  var ret =from t in Tbblankimages where t.Comment == "1234" select     t;    
  var im = ret.First();   
  MemoryStream ms = new MemoryStream();
  using (FileStream file = new     FileStream("E:\\saved.jpg",FileMode.Open,System.IO.FileAccess.Read))
  {
  file.CopyTo(ms);
  }
  byte[] imageData= ms.ToArray();
  im.Image = imageData;   
  Test(this);
  }
  static void Test(System.Data.Linq.DataContext c)
  {
   c.SubmitChanges();
  }
  </code></pre>
  
  <p>Screenshots with error messages:</p>
  
  <p><a href="https://imgur.com/a/18a7lSo" rel="nofollow noreferrer">https://imgur.com/a/18a7lSo</a>   (screen 1)</p>
  
  <p><a href="https://imgur.com/a/Nipp7t5" rel="nofollow noreferrer">https://imgur.com/a/Nipp7t5</a>   (screen 2)</p>
  
  <p>Also I should add that the database is PostgreSQL and I use custom driver to it from here:
  <a href="https://github.com/fknx/linqpad-postgresql-driver" rel="nofollow noreferrer">https://github.com/fknx/linqpad-postgresql-driver</a>
  Version of Postgresql is 11.3-4-windows-x64</p>