The following code results in an error:
ABCEntities Context = new ABCEntities();
var woDateQuery = (from p in Context.WOes
where p.WorkOrder == int.Parse(workOrderDropDownList.SelectedValue.ToString())
dateRequestedLabel.Text = Convert.ToString(woDateQuery);
p.Date is a DB Type datetime. What I'm trying to do is convert a datetime variable into a string.
The error I get is as follows: NotSupportedException was unhandled by user code. LINQ to Entities does not recognize the method 'Int32 Parse(System.String)' method, and this method cannot be translated into a store expression.
Thanks for your help.