I am new in MVC. I want list view to generate by passing Date Parameter in controller; But I got error please help me solve the problem. my controller code is
- LPDBContext DB = new LPDBContext();
- var items = db.Processes.Where(x =>x.PRDate.ToShortDateString().Equals(08 / 09 / 2018)).ToList();
-
- return View(items);
My List View code is
I got following error
LINQ to Entities does not recognize the method 'System.String ToShortDateString()' method, and this method cannot be translated into a store expression.