I am trying to convert one application to EntityFrameWork codefirst. My present code is
string sFrom ="26/12/2013";
select * FROM Trans where CONVERT(datetime, Date, 105) >= CONVERT(datetime,'" + sFrom + "',105)
And i tried
DateTime dtFrom = Convert.ToDateTime(sFrom );
TransRepository.Entities.Where(x =>Convert.ToDateTime(x.Date) >= dtFrom)
But I got an error like this
LINQ to Entities does not recognize the method 'System.DateTime ToDateTime(System.String)' method
Please help Thanks in advance