title: F# query vs C# LINQ
body: <p>This question is more relating to what seems to be verbosity and less clarity on the part of F# compared to C#. A relatively minor issue but one that is becoming quite annoying the more database queries I write.</p>
  
  <p>In C# I can do the following with LINQ and Entity Framework:</p>
  
  <pre class="lang-cs prettyprint-override"><code> var q = (from row in db.LAYERS
            where row.LIST1.Field1 == PARAM
            select new MyClass( row.field1, row.field2, row.field3, row.field4)).ToList()
  </code></pre>
  
  <p>The point is here I am just building a new list of classes inside the query itself.
  Whereas in F# this does not seem to work and in order to get the same result I'm doing something like this:</p>
  
  <pre><code>    query { for row in db.LAYERS do 
          where (row.LIST1.Field1 = PARAM)
          select row.field1, row.field2, row.field3, row.field4 } 
          |&gt; Seq.map (fun row -&gt; new MyClass(row.field1, row.field2, row.field3, row.field4)
  </code></pre>
  
  <p>F# is requiring me to do a map on the query sequence to get the list I want.</p>