Development – Leet 4 Life

Software Development Code Samples and More

Skip to: Content | Sidebar | Footer

Tag: Results

Randomizing Results of a Data Query in T-SQL and the Entity Framework

9 April, 2012 | C#. NET, Entity Framework, T-SQL | By: Michael Merrell

There are many scenarios where you may need to randomize the results of a query that is pulling data out of your database.  When you are able to do this using straight T-SQL the statement is simple and easy.  All you have to do to get random ordered results using T-SQL is add the following order by clause to the end of your statement. The issue comes into play when you need to do this inside of the Entity Framework when pulling form LINQ to SQL. While there are several different ways you can do this when you are using LINQ to [Read More…]