title: Writing F# queries in LINQPad
body: <p>I'm trying to use F# to construct a query against a database, but I can't get even the simplest of queries to compile. </p>
  
  <p>I can construct a C# query like this:</p>
  
  <pre class="lang-cs prettyprint-override"><code>from c in Categories
  select c
  </code></pre>
  
  <p>Everything works fine. However, when I try to do what should be the same thing in F#:</p>
  
  <pre><code>query { for c in Categories do
          select c }
  </code></pre>
  
  <p>I get the following error:</p>
  
  <blockquote>
    <p>Invalid use of a type name and/or object constructor. If necessary use 'new' and apply the constructor to its arguments, e.g. '<code>new Type(args)</code>'. The required signature is:    <code>Categories() : unit</code>.</p>
  </blockquote>
  
  <p>LINQPad comes bundled with a number of samples, but none of the F# samples actually show how to use it to query against a database. I've looked around the internet, also, but I can't find any examples using F# to query a database in LINQPad. What am I missing here?</p>