Ramco Ramco

Ramco Ramco

  • 465
  • 2.8k
  • 394.6k

Error - Cannot implicitly convert Anonymous type to generic list

Jul 5 2022 11:15 AM

Hi

  On below code i am getting above error

public List<View_SessionDeliveryCalendarDetails_Student> GetOrderingInput()
        {
            List<View_SessionDeliveryCalendarDetails_Student> Result = (from t in context.View_SessionDeliveryCalendarDetails_Students
                                                        join t2 in context.View_BookDeliveryDetails
                                                        on new { p1 = (int)t.BookID, p2 = (int)t.StudentID} equals new { p1 = (int)t2.BookID, p2 = (int)t2.StudentID }
                                                        where t.CurrentStatus == "Due"
                                                        orderby t.Name
                                                        select new {t.Name,t2.AURL }).ToList();
             return Result;
        }


Answers (3)