Hi,
I am trying to select 5 random records from my table using linq to sql, but all attempts have failed. I have created a random function in the .dbml file as
public Guid NewId()
{return Guid.NewGuid();}
and calling my linq as
var _results = (from a in Db.Articles
order by Db.NewId()
select new {a.name, a.DOB }).Distinct().Take(5)
But I get the top 5 rows everytime. Would really appreciate some help here.
Thanks