September 9, 2010  
  You are here:  Blog
LINQ to Joe Archive
Module Border Module Border
My Book

C#


VB

Module Border Module Border

LINQ to Joe
 
Author: Joe Rattz Created: 9/12/2006 9:04:45 AM
This is where I will post my thoughts, discoveries, and tribulations as I learn Language INtegrated Query (LINQ).

Using LINQ With System.Web.Caching.Cache (A Legacy Collection)
By Joe Rattz on 3/3/2010 5:49:05 PM

 

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 production I realized what I really wanted was a way to manually flush the cache of the ad content when I wanted to.  This would allow me to keep the ad content cached for a long period of time but provided a way to flush the ad content when I wanted it to change.

So I created a page to allow me to ...

Comments (0) More...

Creating A Reusable AdRotator ASP.NET User Control Using LINQ
By Joe Rattz on 2/11/2010 11:07:33 PM

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, perhaps even on the same page.  I also wanted to be able to either have an instance have its own pool of ad content, or share the ad content with another instance.  Since the built-in AdRotator control has a Keyword feature, that would be how I would control which pool of ad content an instance of the user control displayed content from.

Additionally, I wanted the ad content coming from the dat ...

Comments (0) More...

A Practical Lambda Expression Example For The UPS Tracking Web Service Call
By Joe Rattz on 2/3/2010 3:17:28 PM

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 expressions to be useful for this purpose.

When compiling the UPS-provided test code, I received the following warning:

'System.Net.ServicePointManager.CertificatePolicy' is obsolete: 'CertificatePolicy is obsoleted for this type, please use ServerCertificateValidationCallback instead.

While it's just a warning and the code worked just fine, the code causing the warning has been obsolete for quite a while now so I thought I ...

Comments (0) More...

Using LINQ to Generate Test Data with the Range Operator
By Joe Rattz on 10/21/2009 12:27:41 PM

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)
                     .Select(i => new
                   &a ...

Comments (0) More...

Pro LINQ: Language Integrated Query in VB 2008 Available and Shipping
By Joe Rattz on 8/12/2009 6:09:06 PM

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.

Comments (0)

Final Edits For Pro LINQ: Language Integrated Query in VB 2008 Have Been Submitted!
By Joe Rattz on 7/12/2009 1:17:23 AM
I just turned in the final edits for my Pro LINQ: Language Integrated Query in VB 2008 book. That means it should actually be available in early August. Now I just have to update this site for it.
Comments (0)

Using LINQ to Obtain a Control Reference in an ASP.NET Repeater Item's ControlCollection
By Joe Rattz on 1/23/2009 2:22:41 PM

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 graphic representation of data.  Sure, I use web grids more frequently, but when you have multiple instances of data that just doesn't fit in a single line well, the Repeater is the answer.  Consider listings of homes for sale, or cars.  You typically see an image of the house or car, and several fields of information.  There are usually so many fields, that the data will just not fit in a single line in a grid.  Plus, the image would make the l ...

Comments (2) More...

LINQ to SQL Has a Future Despite the Rumors
By Joe Rattz on 9/22/2008 10:15:51 AM

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 at Microsoft to get his position on the future of LINQ to SQL.

Scott told me "Regarding LINQ to SQL, we definitely don't have plans to drop this.  We plan to continue to fully support this going forward.".

Scott continued with "I actually blog most of my samples using LINQ to SQL these days (I just did one last week on ASP.NET MVC form scenarios and used LINQ to SQL for the data access).  Expect to see me continue to blog mor ...

Comments (0) More...

Pro LINQ Kindle Edition Now Available
By Joe Rattz on 7/16/2008 4:50:16 PM

 

Well, my book has finally hit the 21st century.  That's right, the Amazon Kindle edition is now available.

http://www.amazon.com/Pro-LINQ-Language-Integrated-Query/dp/B001CD1X7S?tag=netsplore-20

Comments (0)

Using Lambda Expressions
By Joe Rattz on 7/4/2008 12:28:11 PM

I have had very positive feedback about my book, and my coverage of lambda expressions has specifically been mentioned on occasion. I have also noticed that some developers are a bit uncomfortable with lambda expressions, so I thought that by sharing the lambda expression portion of my book, perhaps it would help alleviate concern for some developers.  Hopefully this portion will help them embrace what lambda expressions can do for them.

The portion that I am sharing here is only part of what I cover in my book.  In the book, I show the journey from using named methods to anonymous methods and then finally to lambda expressions.  I begin with the premise that a common code developer has created a common method named FilterArrayOfInts and that it is another developer's task to utilize that common method to filter an array so that only odd integers remain.&am ...

Comments (0) More...

 
 
Home|Forums|Blog|LINQ Extras|Contact Me|Book Reviews
  Copyright (c) 2010 LINQDev Terms Of Use Privacy Statement