var query = from d in db.mytable
where d.Code == int.Parse(WebUtils.GetQueryString("Code"))
orderby d.PersonInfo
select d;
i get the following error
LINQ to Entities does not recognize the method 'Int32 Parse(System.String)' method, and this method cannot be translated into a store expression.
i have tried to rewrite the int.Parse(WebUtils.GetQueryString("Code")) like this int intCode = int.TryParse(WebUtils.GetQueryString("OfferCode"));
but still got an error