title: Encapsulate context constructor on a query object
body: <p>It is a good idea to create a class that holds both the query and the context constructors as Func of Context and Func of IQueryable of TEntity for solving the context lifetime problem?</p>
  
  <p>Example:
  On your data layer, if you use one context per method using the "using" statement, you can't return IQueryables because this wouldn't be valid after the context has been released, this makes you use of:</p>
  
  <ul>
  <li>One context per form (This would need injecting the form context onto your data layer)</li>
  <li>Thread static context </li>
  <li>Call ToList() before returning the query (Disable query composition)</li>
  </ul>