Monday, January 07, 2008

LINQ to TerraServer

Charlie Calvert's Community Blog - TerraServer Sample: A LINQ Provider

"Over the holidays Alex Turner, Mary Deyo and I added a new sample to the downloadable version of the CSharp samples that accompany Visual Studio 2008. This sample is called the LinqToTerraServerProvider, and it appears in a sub-directory called WebServiceLinqProvider. The LINQ provider technology that makes this sample possible is also used by other tools such as LINQ to Amazon, LINQ to LDAP, LINQ to SharePoint, and LINQ to Google Desktop.

...

The TerraServer example shows how to create a LINQ provider. The provider technology makes it possible for your to extend LINQ to enable querying a new data source. For instance, LINQ ships with the ability to query SQL servers, XML files and generic objects. The LINQ provider technology allows you to extend LINQ so you can query a new data source such as a text file or a web site. This particular sample shows how to write a provider that makes it possible for LINQ developers to query the web service provided by the TerraServer mapping and aerial photography web site.

The following query from the sample will return a list of states in the US that have a city, town or some other location called Redmond:

var query1 = from place in terraPlaces
where place.Name== "Redmond"
select place.State;


..."




This is kind of like "LINQ to World"?  ;)

No comments:

Post a Comment

NOTE: Anonymous Commenting has been turned off for a while... The comment spammers are just killing me...

ALL comments are moderated. I will review every comment before it will appear on the blog.

Your comment WILL NOT APPEAR UNTIL I approve it. This may take some hours...

I reserve, and will use, the right to not approve ANY comment for ANY reason. I will not usually, but if it's off topic, spam (or even close to spam-like), inflammatory, mean, etc, etc, well... then...

Please see my comment policy for more information if you are interested.

Thanks,
Greg

PS. I am proactively moderating comments. Your comment WILL NOT APPEAR UNTIL I approve it. This may take some hours...