Click here to Skip to main content
15,889,651 members
Please Sign up or sign in to vote.
4.00/5 (1 vote)
See more:
C#
public int GetTableData()
       {
           var key = from k in base.DataContext.Keyword
                        select k;
           return key;
       }


In the above code i have written a method to get my respective data from the entity(.edmx file) which is in base.datacontext. But instead i want to pass the table name dynamically (Instead of Keyword in the above code). I want to pass a variable table name with which i can use this method to fetch data from multiple tables.

Can anybody help please.....!!!!!
Posted

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900