I want to use First() in a Linq2sql query, but I don't want the database to return the whole row, just specific columns. Is there a way to do that?
If I use Where() I can then Select() (while it stays an IQueryable), but if I use Where() it will iterate over all rows instead of stopping when it finds a match.
SELECT ColumnName FROM Table?linq-to-sqltag.Where().Select()first and then useFirst(). That's the equivalent ofSELECT TOP 1 col1,col2 ..... WHERE ..