I need to execute a custom SQL query, which I cannot do with regular L2S:
select [row_number] from (select row_number() over (order by CreatedOn desc, ID desc) as [row_number], ID from MyTable) as T1 where ID = {0}
so i try
var r = db.ExecuteQuery<int>(q, id).Single();
but this will not work (getting System.InvalidCastException: the specified listing is not valid). Any suggestions?
source
share