Reputation: 14511
I have a Linq to Entity Select statement that is currently returning all rows from the database. Since the 1st row of data contains header information, is it possible to exclude the first row from the result set?
var surveyProgramType = surveyProgramTypeRepository
.Find()
.OrderBy(x => x.ProgramType);
Upvotes: 0
Views: 1276
Reputation: 152
var surveyProgramType = surveyProgramTypeRepository
.Find()
.OrderBy(x => x.ProgramType).Skip(1);
Upvotes: 1
Reputation: 152501
use .Skip()
var surveyProgramType = surveyProgramTypeRepository
.Find()
.OrderBy(x => x.ProgramType)
.Skip(1);
Upvotes: 10