title: Getting a linq table to be dynamically sent to a method
body: <p>I have a procedure: </p>
  
  <pre><code>var Edit = (from R in Linq.Products
              where R.ID == RecordID
              select R).Single();
  </code></pre>
  
  <p>I would like to make <code>Linq.Products</code> dynamic.  Something like:</p>
  
  <pre><code>protected void Page_Load(object sender, EventArgs e)
  {
      something(Linq.Products);
  }
  
  public void something(Object MyObject)
  {
      System.Data.Linq.Table&lt;Product&gt; Dynamic =
          (System.Data.Linq.Table&lt;Product&gt;)MyObject;
      var Edit = (from R in Dynamic
                  where R.ID == RecordID
                  select R).Single();   
  </code></pre>
  
  <p>My problem is that the "something" method will not be able to know what table has been sent to it. So the static line: <code>System.Data.Linq.Table&lt;Product&gt; Dynamic = (System.Data.Linq.Table&lt;Product&gt;)MyObject;</code> would have to reflect something like: <code>System.Data.Linq.Table&lt;T&gt; Dynamic = (System.Data.Linq.Table&lt;T&gt;)MyObject;</code></p>
  
  <p>With <code>&lt;T&gt;</code>  being a dynamic catch all variable so that Linq can just execute the code just like I hand coded it statically. I have been pulling my hair out with this one. Please help.</p>