How do I write this query in Linq to Entities:
select convert(datetime,data,103) from Audit where ActionId = 1
Column Data is of varchar(max) type. I know that if the ActionId equals one in a row, than the Data column in the row will always contain a string that represents a date in dd/MM/yyyy format.
Update:
I need to return the result of the L2E query as IQueryable, because paging / sorting is applied on top of it. This is another reason, why I want this field returned as DateTime
- to be able to sort on it.