table name as a parameter to Linq RRS feed

  • Question

  • hi all,
    i written the a method which will returs the data from the table
    below is the code :

    public static List<emp> fillgrid()
        {   testingEntities TE=new testingEntities();
    var query= from e in TE.emps select e; return query.ToList();  
    i need to table name as parameter so that same logic will be reused to other
    tables also how can i do that or any alternate process
    Thanks Inadvance

    Thursday, April 19, 2012 3:15 PM


  • Using dynamic linq. http://weblogs.asp.net/scottgu/archive/2008/01/07/dynamic-linq-part-1-using-the-linq-dynamic-query-library.aspx

    Fighting like Allen Iverson. Neve give up!

    • Marked as answer by Alan_chen Tuesday, May 8, 2012 2:41 AM
    Sunday, April 22, 2012 8:43 AM