I have a procedure:
var Edit = (from R in Linq.Products
where R.ID == RecordID
select R).Single();
That I would like to make "Linq.Products" Dynamic. Something like:
protected void Page_Load(object sender, EventArgs e)
{
something(Linq.Products);
}
public void something(Object MyObject)
{
System.Data.Linq.Table<Product> Dynamic =
(System.Data.Linq.Table<Product>)MyObject;
var Edit = (from R in Dynamic
where R.ID == RecordID
select R).Single();
My problem is that I my "something" method will not be able to know what table has been sent to it. so the static line: System.Data.Linq.Table Dynamic = (System.Data.Linq.Table)MyObject;
Would have to reflect somthing like: System.Data.Linq.Table Dynamic = (System.Data.Linq.Table)MyObject;
With 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.