Tuesday, March 27, 2007

Angel Saenz-Badillos on LINQ Extensions

A search on "does not contain a definition" AsEnumerable turned up a February 23, 2007 does not contain a definition for post by Angel Saenz-Badillos, a "voice from the past." During the Whidbey beta, Angelsb had been an indispensable source of information on ADO.NET esoterica, such as Multiple Active Result Sets (MARS), connection/session pooling, asynchronous command execution, transactions, and SQLCLR user-defined types.

He and Pablo Castro saved me many hours of headscratching while writing books and magazine articles before Visual Studio 2005's RTM. Angelsb's posts and responses to forum questions have always been marvels of lucidity and completeness, despite their exclusive use of C#.

During his year or more of what I call exile in the Lotusland of JDBC, I had turned off Angelsb's RSS feed. Now I find he's working on LINQ extensions, specifically LINQ to DataSet and LINQ to Entities.

His February 23 post explains how to overcome in LINQ to DataSet code the

'System.Data.DataTable' does not contain a definition for 'AsEnumerable' and no extension method 'AsEnumerable' accepting a first argument of type 'System.Data.DataTable' could be found (are you missing a using directive or an assembly reference?)


The type arguments for method 'System.Linq.Enumerable.AsEnumerable<TSource>(System.Collections.Generic.IEnumerable<TSource>)' cannot be inferred from the usage. Try specifying the type arguments explicitly

exceptions by adding using/Imports System.Linq to your class and a reference to System.Data.Entity.dll to your project.

I'm looking forward to las joyas de Saenz-Badillos and, needless to say, have added his feed to my growing list of LINQ-related blogs. RecepciĆ³n a bordo.

P.S.: Apparently, Julie Lerman was having the same problem as I. Her March 5, 2007 LINQ and Entity Framework Resources for March Orcas CTP post was the second hit of my search.


Angel said...

I have been a long time subscriber to this blog, thanks for the kind words though I had no idea that my lotusland vacation had such dire consequences.

Things are getting interesting in this space, LINQ and Entities are going to change the game (for better or for worse, I am sure we will see plenty or proponents in either camp).

I can honestly say that I have never seen an effort like what this team is doing for the next release, love them or leave them (which you can) Entities are a beautiful showcase of technology.
Angel Saenz-Badillos

--rj said...


Glad you're back in the non-Java fold. I certainly agree that LINQ and (possibly to a lesser extent) EDM will "change the game" for data-intensive project developers.

Hopefully, the EDM Designer delay mentioned in my Orcas EDM Wizard and Designer Previewed at VSLive! SFO post will turn out to be greatly exaggerated.