Hi
How i should pass value to List
public List GetSessionDeliveryParticipantList(DateTime frDate, DateTime toDate, List Student, )
{
List Result = (from t in context.View_SessionDeliveryParticipant_Detailed_Reports
where t.SessionDate.Value.Date >= frDate.Date && t.SessionDate.Value.Date <= toDate.Date
&& (Student.Count != 0 ? Student.Contains(t.StudentID.ToString()) : 1 == 1)
orderby t.SessionDate ascending
select t).ToList();
return Result;
}
Thanks
Jignesh KumarPosted Apr 7, 2023, 6:31 AM
Hello Ramco,
Please try this one,
while calling this method you need to pass empty list of string
Tuhin PaulPosted Apr 9, 2023, 8:49 PM
In this modified version of the code, I've added parameter validation in the form of an ArgumentException if any of the input parameters are null or empty. I've also changed the variable name Result to result to follow C# naming conventions, and added consistent indentation and spacing.
Rajkiran SwainPosted Apr 7, 2023, 6:22 AM