Error with LINQ in MVC : First of all, sorry for my bad english.

Im developing a MVC website. In one of the View i need to use:

    return View(db.Logs.OrderByDescending(l => l.Date)
    
    .Where(l => ((DateTime)l.Date).ToLocalTime().ToString().Contains(search) 
    
    || l.Name.Contains(search)).ToList().ToPagedList(pageNumber, pageSize));

But i get this error:                

> LINQ to Entities does not recognize the method 'System.DateTime
> ToLocalTime()' method, and this method cannot be translated into a
> store expression.

I need transform `l.Date` toLocalTime and then compare with `search`

How can i do it?