What’s the right syntax for this?
var words= from h in db.Words
orderby(a => Guid.NewGuid()).ToList()) //error
select h;
var words= from h in db.Words
orderby((a => Guid.NewGuid()).ToList()) //error
select h;
var words= from h in db.Words
orderby(Guid.NewGuid()) //no error but doesn't sort
select h;
Assuming that you don’t mind not having all of your code embedded in the LINQ query, you can try this:
Though if you need the Guid approach: