Dr.Ajay Kashyap

Dr.Ajay Kashyap

  • NA
  • 521
  • 283.4k

Getting error in LINQ

Nov 25 2016 1:20 AM
LINQ to Entities does not recognize the method 'System.DateTime ToDateTime(System.String)' method, and this method cannot be translated into a store expression.
 
IN This Line :-
 
Events = db.Events.Where(a => (a.Active == true) && (a.IsDelete == false && a.IsRejected == false && Convert.ToDateTime(a.EventEndDate) > DateTime.Now)).ToList(); 

Answers (2)