Browse by Tags

All Tags » SQL Server » Tips and Tricks (RSS)

Performance Tip: Return Only Necessary Columns Using LINQ by Jason N. Gaylord's Blog

I was running into an issue where one of my webmethods was taking a large amount of time to return a small set (5-10 objects). I was using LINQ to SQL. I noticed that the LINQ to SQL query was returning all of the rows. After looking into the table a...

Retrieving SQL Type Image Using LINQ by Jason N. Gaylord's Blog

LINQ views the Image type in SQL Server as Binary. So, there are a few options that we have. We can either (a) modify our LINQ to SQL class and change the property to Byte() instead of Binary or we can (b) convert the Binary to an array. To do the latter...

Aggregate Functions in LINQ by Jason N. Gaylord's Blog

I found a great post which summarizes aggregate functions in LINQ. It includes examples for Average, Sum, and Count. Check it out at http://www.dev102.com/2008/04/16/how-to-use-aggregate-functions-with-linq-to-sql/ . As always, you can test your functions...
Powered by Community Server (Commercial Edition), by Telligent Systems