LINQ "table" variable
        Posted  
        
            by Cat
        on Stack Overflow
        
        See other posts from Stack Overflow
        
            or by Cat
        
        
        
        Published on 2009-10-14T20:33:37Z
        Indexed on 
            2010/04/30
            3:07 UTC
        
        
        Read the original article
        Hit count: 393
        
I'm trying to turn a method I have right now into a more "generic" method that returns a string. Right now, the method uses a statement like this:
var app = (from d in testContext.DAPPs
     where d.sserID == (Guid)user.ProviderUserKey
     select d).ToList();
I process the results of "app", add extra text etc. The piece that changes (that I need to make more "generic") is the table name (DAPPs). Is there a way I can do that, or, a better way to go around this all together?
© Stack Overflow or respective owner