Search This Blog

Friday, February 21, 2014

Linq to SQL equivalent to TOP

C# > LINQ > Take

Take returns the first specified number of elements.

Example
Linq to SQL equivalent to TOP

var query = from q in dc.Queries.OrderBy(f => f.name).Take(10)