Ramco Ramco

Ramco Ramco

  • 442
  • 3.4k
  • 528.7k

Distinct Records

Apr 6 2023 3:37 AM

Hi

  In below linq query i want to get only distinct records

public List<View_SessionDeliveryCalendarDetails_Student> GetStudentsByMentor(Int32 MentorId)
        {
            List<View_SessionDeliveryCalendarDetails_Student> Result = (from t in context.View_SessionDeliveryCalendarDetails_Students
                                                                        where (MentorId != 0 ? t.MentorID == MentorId : 1 == 1)
                                                                        select t).ToList();
            
            return Result;
        }

Thanks


Answers (7)