LLBL's typed DataTables for .NET3.5 and LINQ

Posts   
 
    
omar avatar
omar
User
Posts: 569
Joined: 15-Oct-2004
# Posted on: 08-Mar-2008 11:38:53   

One of the engancements introduced by VS2008/.NET3.5 to support LINQ2DataSets is the introduction of the new type TypedTableBase<T> which extends the standard DataTable class.

When VS2008 (and the XSD.exe tool) generate a typed DataSet/DataTables, the resulting typed DataTable inherits from the new TypedTableBase<T> (instead of the DataTable class). This makes the resulting typed DataTable enumerable becuase TypedTableBase<T> implements IEnumerable and IEnumerable<T>. This in turn makes a typed DataTable queryable by LINQ.

Not meaning to go into lecture mode with the length introduction, but I thought to ask if LLBL's templates could do the same when generating typed DataTables targeting the .NET3.5 platform?

Otis avatar
Otis
LLBLGen Pro Team
Posts: 39903
Joined: 17-Aug-2003
# Posted on: 08-Mar-2008 12:10:18   

Good tip! I didn't think of that, but it's a thing to look into. One thing that has to be addressed is serialization however perhaps that can be moved to the template code. This will then be a change considered for v2.6, so it wont be in the linq ctp yet. Added to the list of things to change for v2.6

Frans Bouma | Lead developer LLBLGen Pro
omar avatar
omar
User
Posts: 569
Joined: 15-Oct-2004
# Posted on: 08-Mar-2008 12:36:48   

Thanks... its good to feel usefulwink