Hi
I want to Bind 2 Linq queries & then Bind To Repeater
public List GetSessionToJoin(Int32 StudentID, String EntriesType)
{
List Result = (from t in context.View_SessionDeliveryCalendarDetails_Students
where t.StudentID == StudentID
&& (EntriesType == "Completed" ? t.CurrentStatus != "Due" && t.ParticipationID != 0 : t.CurrentStatus == "Due")
&& (EntriesType == "Today" ? t.SessionDate == DateTime.Now.Date && t.ActiveParticipant == true : 1 == 1)
&& (EntriesType == "Upcoming" ? t.SessionDate > DateTime.Now.Date && t.ActiveParticipant == true : 1 == 1)
orderby t.SessionDate
select t).ToList();
return Result;
}
public List GetFreeTrialSessionToJoin(Int32 StudentID)
{
List Result = (from t in context.View_BookDeliveryDetails
where t.StudentID == StudentID
select t).ToList();
return Result;
}
Thanks
Amit MohantyPosted Jun 16, 2023, 5:03 AM
Tuhin PaulPosted Jun 16, 2023, 2:12 AM
The provided code shared by Rajkiran Swain combines the results of two queries (sessionData and freeTrialData) into a single collection (combinedData) and returns it as a list of objects. If you would like to modify this code, could you please provide more specific details about what changes or enhancements you would like to make? This will help me provide a more accurate modification to the code.
Rajkiran SwainPosted Jun 15, 2023, 4:21 PM