How do I perform Date Comparison in EF query?

后端 未结 11 1287
悲哀的现实
悲哀的现实 2020-11-30 07:33

Please help. I am trying to figure out how to use DATE or DATETIME for comparison in a linq query.

Example: If I wanted all Employee names for those who started befo

11条回答
  •  攒了一身酷
    2020-11-30 07:44

    try this:

    DateTime dd = DateTime.Parse("08/13/2010 00:00:00");
    var data = from n in ContributionEligibilities
               where n.ModifiedDateTime.Date >= DateTime.Parse("08/13/2010").Date
               select n; 
    data.Dump("Result") ;
    

提交回复
热议问题