Using LINQ To Filter By Object Type and Then Quantify
Every so often I run across a case where LINQ comes in so handy that I just want to post a quick article sharing some particular usage of it. For this example I was working on a web page that shows user roles and their permissions within my applictation. Below is a photo showing how the display looked before my added LINQ code.
My web application has other roles not listed in that image. This is why there are som
Using LINQ With System.Web.Caching.Cache (A Legacy Collection)
In my previous blog post titled "Creating A Reusable AdRotator ASP.NET User Control Using LINQ" I took advantage of caching with the System.Web.Caching.Cache object to prevent constantly querying the database for the ad content. Since I intentionally didn't leverage the cache dependencies feature, my cached ad content would only refresh at a certain time interval. After putting that code into p
Creating A Reusable AdRotator ASP.NET User Control Using LINQ
I recently had the need for an AdRotator on one of my websites. ASP.NET already comes with an AdRotator server control but since I wanted to make it even easier to reuse, I decided to create an ASP.NET user control that leverages the ASP.NET AdRotator server control, but handles all the lower-level details. Requirements
One of my requirements is that I wanted to be able to have multiple instances of this user control
A Practical Lambda Expression Example For The UPS Tracking Web Service Call
In "Pro LINQ: Language Integrated Query in C# 2008" I provided an example of the evolution of named methods to anonymous methods and finally to lambda expressions. I was illustrating the brevity that anonymous methods provide over named methods, and that lambda expressions provide over anonymous methods. Just this week, while consuming the UPS Tracking web service, I have yet again found lambda
Using LINQ to Generate Test Data with the Range Operator
When working on Pro LINQ, one of the operators that caught my attention is the Range operator. The Range operator generates a sequence of integers. At the time, this seemed like it could be very useful for generating test data. I just used this again for a sample application I was working on and thought I should make a blog post about it.
int numItems = 200;
var list = Enumerable.Range(1, numItems)
My latest book, Pro LINQ: Language Integrated Query in VB 2008, was published on August 10, 2009, and is now available and shipping from Amazon.
You may order it from Amazon or learn more about it at Apress.
I haven't been blogging about LINQ much, but I am making it a new year's resolution to blog more frequently about LINQ. Now, don't expect daily or even weekly blog posts because I am just not as prolific as some bloggers. I don't know how some bloggers do it. But, I do plan on blogging more frequently.
One of my favorite, but under-utilized, ASP.NET controls is the Repeater. I think it exemplifies what it is that we like so much about the web; that is, the grap
For the last several months, I have repeatedly heard a rumor that there was no future for LINQ to SQL. One reader even informed me that they heard LINQ to SQL was going to be snuffed and that because of this, their company changed architectural direction away from LINQ to SQL.
Concerned that the rumors may be either true and some developers are on a dead end path, or false and LINQ to SQL adoption may be suffering unnecessarily as a result of the rumors, I emailed Scott Guthrie