TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Kwasi Denkyira
1.5k
197
14.8k
How to get all null items greater than 4 months from current
Aug 1 2019 2:38 PM
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();
Reply
Answers (
4
)
how to manage keys in LINQ with code first data model
i want to filter data with month id like 6