I have a database with x amount users and I want to randomly get all the users and then write like 50 users out on my site. Right now I\'m only using .take(50)
.take(50)
Try this
Random rnd = new Random(); userList = userList.OrderBy(user => rnd.Next()).Take(usercount).ToList();