2
Answers

Conversion error

Ramco Ramco

Ramco Ramco

2y
684
1

Hi

 Error - Cannot implicitly convert type system.linq.Iqueryable to system.collection.generic.list

public List<StudentDetail> GetStudentCurrent(Int32 StudentId)
{
    List<StudentDetail> 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

Answers (2)