title: How can I use LinqPad's generated context in Visual Studio
body: <p>This is a follow-on from this question really:</p>
  
  <p><a href="https://stackoverflow.com/questions/8140385/moving-from-linqpad-to-a-proper-visual-studio-project">Moving From LINQpad to a Proper Visual Studio Project?</a></p>
  
  <p>..but I'm not able to get it to work properly.</p>
  
  <p>An answer to that question suggestions dumping the context assembly out as a dll but although I have done that, when I import it as a reference, it's not exactly clear to me how I would create an instance of that context, point it at a database and actually run a query against it, something like the following:</p>
  
  <p>var db = new ContextFromThatDLL(myconnectionstring);</p>
  
  <p>var query = from a in db.MYTABLE where a.ID == 1 select a;</p>
  
  <hr>
  
  <p>Extra information:</p>
  
  <p>I am using the IQ driver in LinqPad to connect to Oracle.</p>
  
  <p>I <em>do</em> have a license for DevArt already (which the IQ driver uses) but am aware that the IQ driver generates its own SQL from LINQ - and I prefer it. Plus, I develop queries in LinqPad which works great for my workflow but find that DevArt doesn't always generate SQL as good as IQ.</p>