title: Entity framework createquery question
body: <p>I am trying to create a generic search form to use in an EF app. I want to be ably to specify the entity to query at runtime below is a simplified version of the code.</p>
  
  <p>cx is the contect object, valuelists is the entity in question.</p>
  
  <pre><code>1: Dim q As String = "select c from intactentities.valuelists as c"
  2: Dim x = cx.CreateQuery(Of ValueLists)(q)
  3: TextBox1.Text = x.Count
  </code></pre>
  
  <p>This works but I need to remove the hardcoded reference to valuelists in line 3. I expect I am overlooking something simple can anyone suggest a simple solution?</p>
  
  <p>Thanks
  Tony</p>