If you want to select fewer columns, you will need to use the forecast in your linq query.
var articles = (from a in DB.Articles
where a.ArticleId == ArticleId.Question
&& a.DeletedAt == null
&& a.Votes >= minVotes
orderby a.UpdatedAt descending
select new
{
a.ArticleId,
a.Votes
})
.Take(maxarticles);
Doing something like the above translates to SQL, which looks like this:
select top 10
ArticleId,
Votes
from articles
where ArticleId = 1
and DeletedAt is null
and Votes >= -5
order by UpdatedAt desc
source
share