Ramco Ramco

Ramco Ramco

  • 465
  • 2.8k
  • 394.7k

Distinct ParticipantId

Sep 8 2022 5:52 AM

Hi

  In below code i want only Distinct Participant Id

public List<TrainingParticipant> GetSelectedUsers(Int32 ID)
        {
            try
            {
                List<TrainingParticipant> Result = (from t in context.TrainingParticipants
                                                    where t.TrainingID == ID
                                                    select t).ToList();
                return Result;
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }

Thanks


Answers (5)