Hi
Error - Cannot implicitly convert type system.linq.Iqueryable to system.collection.generic.list
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);
return Result;
}
Thanks
Rajanikant HawaldarPosted Oct 10, 2022, 6:57 AM
Amit MohantyPosted Oct 10, 2022, 7:02 AM
To convert
IQuerableorIEnumerableto a list, you have to add .ToList() in your query.