Hi
I want if there is more than 1 record i want to return second record using Linq
Below is the code for first record.
C#
public List GetStudentCurrent(Int32 StudentId)
{
List Result = (from t in context.StudentDetails
join t2 in context.Student
on t.LoginCode equals t2.StudentID
orderby t.StudentID,t.CreatedOn
select t).Take(1).ToList();
return Result;
}Thanks

Rajanikant HawaldarRank #110 · 20.4K reputationPosted Oct 10, 2022, 5:46 AM EDT
public List GetStudentCurrent(Int32 StudentId) { List Result = (from t in context.StudentDetails join t2 in context.Student on t.LoginCode equals t2.StudentID orderby t.StudentID,t.CreatedOn select t).Skip(1).Take(1).ToList(); return Result; }