Hi
I am getting error on Resulr.count
var Result = from t in context.View_MachineShiftDetails
where t.Department == ddlDepartment.SelectedValue
&& t.MachineShiftID == Convert.ToInt32(hdfMachineShiftId.Value)
orderby t.MachineName
select new { t.MachineShiftID, t.Department, t.LocationID, t.Location, t.MachineID, t.MachineName,t.NumberOfShift };
if (Result.Count > 0)
Thanks
Amit MohantyPosted Nov 30, 2022, 8:36 AM
Use Result.Count().
Jignesh KumarPosted Nov 30, 2022, 8:21 AM
Hello,
use this one,
Rajesh GamiPosted Nov 30, 2022, 7:45 AM
Hello Ramco
Try the below query
Sometimes what happens like you haven't gotten any record in the list but you check directly to count.