How to know if LINQ is working efficiently with SQL?

Recently, I recieved the following question on my blog regarding a post I made about using the aggregate function Count.  The question is as follows:  does the LINQ implementation send a full query or just a count query? That can be a big waste, especially if this is called often? One of the nice things about LINQ is you don't have to guess.  By simply turning the Log property to true of the DBContext, you can see what LINQ is actually sending to the database.  below is some simple code that shows how to do this. … Continue Reading

A TiVo Disk Space Viewer, It’s all about LINQ to XML!

Tivo Space Viewer Source Code VS2008 Project Complete Abstract Do you ever want to know exactly how much space each TV show on your TiVo is taking on your hard drive?  Do you ever wonder how much space is consumed by high definition programs verses standard definition programs?  For the answer, download the program associated with this article and you to can know those answers.  Below area  pictures of those graphs.  Chances are though, if you are reading my blog, you really want to know about Microsoft technology, and specifically, this article is all about parsing the webservice data that comes from your TiVo.  At the end of the article, there is a brief section on how to configure this program so if all … Continue Reading

My first LINQ Experience. How to do a simple COUNT() with LINQ to SQL

So, nothing extraordinary here, but I've finally taken the dive into LINQ.  I've got a great book that helping me a lot that I recently review called Pro LINQ by Joseph Rattz (his humor is a little odd, but the book is great).  At anyrate, moving right a long, all I did was right click on my web projects app_code directory, choose LINQ to SQL classes, Then, choose some tables from my database. Then, in my code, all I had to write was the class in my c# code (part of my database layer classes).  Here is what the code looks like (sorry about the jpg, I'm still trying to figure out how to get Copy SourceAsHTML working in vs2008) … Continue Reading


Get every new post delivered to your Inbox

Join other followers: