How do I get ‘anotherColumnName’ in LINQ?
SELECT thisColumnName as anotherColumnName FROM TableName
I have the following which obviously gives me ‘thisColumnName’ not ‘anotherColumnName’
var query = from names in _context.TableName select names; return query.ToList();
Use an anonymous type: