I am trying to get all null items for a table column greater than 4 months from today's date using Linq. Below is my query. Although there are items, my query returns 0. I am not sure what I am doing wrong.
var FinalizedDate = DateTime.Now.AddMonths(- 4);
var test = EmpTable.Include(x => x.admintable.registers.Select(wt => wt.adminSurnames))
.Where(x => x.admintable.Id == 45
&& x.FinalizedDateTime == null && x.FinalizedDateTime > FinalizedDate).ToList();
Vincent Maverick DuranoPosted Aug 2, 2019, 1:19 PM
Kwasi DenkyiraPosted Aug 2, 2019, 6:02 PM
Kwasi DenkyiraPosted Aug 2, 2019, 6:41 AM
Vincent Maverick DuranoPosted Aug 1, 2019, 3:00 PM