Hi
I want if there is value in Status then it should return only those records else it should return all records.
List Result = (from t in context.View_Details
where t.FromDate.Value.Date >= frDate.Date && t.FromDate.Value.Date <= toDate.Date
&& (t.Status != "" ? t.Status == TStatus.ToString() : 1 == 1)
select t).ToList();
return Result;
Thanks
Sachin SinghPosted Oct 9, 2022, 8:00 AM
test this
Jignesh KumarPosted Oct 9, 2022, 6:15 AM
Hi Ramco,
Please use below query which will help you out,