title: linqpad - SubmitChanges Extension
body: <p>Is it possible to get SubmitChanges() to work from within an extension method?</p>
  
  <p>I currently have this:</p>
  
  <pre><code>void Main()
  {
      // Write code to test your extensions here. Press F5 to compile and run.
      Helper.ConfirmSubmitChanges();
  }
  
  public static class Helper
  {
      // Write custom extension methods here. They will be available to all queries.
      public static void ConfirmSubmitChanges() 
      { 
          if (MessageBox.Show("Save?", "Do you really want to save all changes?", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.Yes)
          {
              SubmitChanges(); 
          }
      }
  }
  
  // You can also define non-static classes, enums, etc.
  </code></pre>
  
  <p>But SubmitChanges() is out of context here. Is there anything that i can pass it from my queries that will use this extension to make it work?</p>
  
  <p>Thanks,
  Kohan</p>