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

Pro ASP.NET 3.5 and C# 2008 Released! Another Master Piece

Many of you know that my favorite technical book in the world was Pro ASP.NET 2.0 and C# 2005 by Mathew MacDonald.  Well, Mathew has done it again.  I can't believe I didn't know it was coming, but there I was in the book store looking for books on LINQ and right in front of me was his new book with a nice chapter on LINQ.  So, it's now mine!  It's also got a large section on all the new Ajax stuff that I'm looking forward to reading.  I'm mostly a back end database kind of guy but I know I need to learn the javascript stuff better.  I can do it, but not as well as I'd like to be able to. Run don't walk.  go buy this book! Pro ASP.NET 3.5 in C# 2008, Second Edition … Continue Reading

Book Review: Pro LINQ Language Integrated Query in C# 2008 by Joseph C. Rattz, Jr.

Now that Visual Studio 2008 has RTM' d, I'm very motivated to learn LINQ.  Like most of us, I've read articles, seen presentations, talked a lot about it, but now, it's time to begin in earnest.  What does that mean?  Time to get the books and start doing some serious examples myself.  I just bought the book "Pro LINQ Language Integrated Query in C# 2008" and so far am very impressed.  Because I'm a total newbie to link, I started with the first chapter (very unusual for me).  That was a good overview of the different types of LINQ.  One thing I learned was that all those names like dlinq,xlinq, etc. are no longer valid.  I kind of thought that, but couldn't find it written explicitly … Continue Reading

Why can I not Bind to a value on a DropDownList in a GridView with ASP.NET 2.0 or 3.5?

So, I guess I should have know the answer to why the following does not work.  Basically, the scenario I have is that I have a foreign key column in my GridView that I want to show as a DropDownList of values.  The code below shows me the values in the DropDownList, but when I update it with the "edit" of the GridView row, the value does not get saved.  Here is the code and what it looks like running: … Continue Reading


Get every new post delivered to your Inbox

Join other followers: