You can use the following code snippet to get random row from a table:
int allCount = dataContext.Cars.Count();
randomSkip = rnd.Next(0, allCount-1);
var query = dataContext.Cars.OrderBy(c=>c.CarID).Skip(randomSkip).Take(1);
var sql = query.ToString();
var result = query.ToList();
First I am getting the total number of rows in the table.
Then I create a new random number generator and use it to skip to an arbitrary row.
This option is totally independent from the backend that you use.
If you want something closer to your original SQL query and you target only MS SQL as backend, you can use the following snippet:
var query1 = (from c
var sql1 = query1.ToString();
var result1 = query1.ToList();
Here the magic is done by the SQL<T>() extension method that allows you to plug some SQL statements in your queries.
If you need any further assistance, please let me know.
All the best,
the Telerik team
Q3'12 SP1 of OpenAccess ORM packs Multi-Table Entities mapping support. Check it out.