I just double-checked this using ES2008 against SQL Server Northwind. It does not put square brackets around raw SQL, and works as expected.
Code:
OrderDetails od = new OrderDetails();
od.Query.es.Top = 1;
od.Query.OrderBy("<NEWID()>", esOrderByDirection.Ascending);
od.Query.Load();
LastQuery:
Code:
SELECT TOP 1 *
FROM [Order Details]
ORDER BY NEWID() ASC
Perhaps, if you posted the code for your query, we might spot something. When you post your reply, the last icon on the right will let you paste in source code, and format it for the selected language. Although, after you click "OK", you will probably have to hand-edit "<" and replace it with "<".
David Neal Parsons
www.entityspaces.net