I have an SQL statement:
Select convert(NVARCHAR, MyDate, 102) + ' ' + convert(NVARCHAR, AccountId) AS Temp from MyTable
I want to convert it with Linq to Entities. I was suggested to query MyDate and AccountId and with Linq to object I can use .ToString(). But I want the sql server to make the conversion by performing the convert() method.
I was happy to find SqlClient class which helps to perform methods on the server side. Unfortunately, there is no Convert() method there only StringConvert() which can only convert a double to string. Can I perform convert(NVARCHAR, MyDate, 102) on the server?