2
Answers

Getting error in LINQ

Photo of Dr.Ajay Kashyap

Dr.Ajay Kashyap

8y
2.2k
1
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)