use*_*794 0 c# linq asp.net-mvc entity-framework
我有一个Linq to Entity Select语句,该语句当前正在返回数据库中的所有行.由于第一行数据包含标题信息,是否可以从结果集中排除第一行?
var surveyProgramType = surveyProgramTypeRepository
.Find()
.OrderBy(x => x.ProgramType);
Run Code Online (Sandbox Code Playgroud)
D S*_*ley 10
使用 .Skip()
var surveyProgramType = surveyProgramTypeRepository
.Find()
.OrderBy(x => x.ProgramType)
.Skip(1);
Run Code Online (Sandbox Code Playgroud)