In various database tables I have both a property and a value column. I\'m using Linq to SQL to access the database.
I\'m writing a method which returns a dictionary
Just add the constraint where T : class to your method declaration.
This is required because Table has a where TEntity : class constraint. Otherwise your generic method could be called with a struct type parameter, which would require the CLR to instantiate Table with that struct type parameter, which would violate the constraint on Table.