28 January 2008

How To analyze T-SQL code?

Analyze T-SQL code using the following functions:

SET STATISTICS TIME ON 
-- query here 
SET STATISTICS TIME OFF 

In Management Studio Messages tab, you will see the number of milliseconds taken by each step in your query.

18 January 2008

IntelliSense not working with Linq

If intelliSense is not working with Linq and SingleOrDefault does not appear in the dataContext associated class, add a

using System.Linq;

:)