.net – Linq to SQL – Return top n rows

.netlinq-to-sql

I want to return the TOP 100 records using Linq.

Best Solution

Use the Take extension method.

var query = db.Models.Take(100);