title: Using Entity framework, just to compile linq to sql
body: <p>I am using entity framework  in order to have linq to sql capabilities, the query will run in other framework.<br>
  Everything is working fine except that the entity framework connect to the database and there for I get some delay.<br>
  Since I just need the generated sql query, there is not point letting entity framework to connect to the db, it is definitely overhead.<br>
  Is there anyway to compile the query without connecting to the db?  </p>
  
  <pre><code>public class Customer
      {
          public int Id { get; set; }
          public string FirstName { get; set; }
          public int Status { get; set; }
      }
  
      public class CustomerContext : DbContext
      {
          public CustomerContext() : base() { }
          public DbSet&lt;Customer&gt; Customers { get; set; }
      }
  </code></pre>
  
  <p>the usage:</p>
  
  <pre><code>// here is the place when the db connection happens.
      using (var db = new CustomerContext())
         {
             var items = db.Customers.Where(o =&gt; (o.FirstName == "test" &amp;&amp; o.Status &gt; 1));
             Trace.WriteLine(items.ToString());
         }
  </code></pre>