I have a table called Quotes in linq-to-sql that contains 2 columns: author and quote. How do you select both columns of a random row?
Here is one way to achieve what you want to do:
var quotes = from q in dataContext.Quotes select q; int count = quotes.Count(); int index = new Random().Next(count); var randomQuote = quotes.Skip(index).FirstOrDefault();