Wednesday, August 15, 2007

LINQ Updates for 8/15/2007

Beth Massi has produced the first two videos in a series featuring VB 9.0 and LINQ: #1 - How Do I: Get Started with LINQ? (00:09:14) and #2 - How Do I: Perform Group and Aggregate Queries? (00:17:22).

Bart de Smet has released LINQ to SharePoint Alpha 0.2.3 updated for VS 2008 Beta 2 with a number of new features and fixes.

Richard Hale Shaw apparently gave a rip-snorting "Moving Up to C# 3.0 and LINQ: What's In It For Me?" presentation of at Julie Lerman's Vermont .NET User Group last night.

Ben Hall, a UK developer, has been investigating LINQ to SQL lately and has interesting posts about partial methods, the LinqDataSource, and DataContext object.

C# MVP Rick Strahl has his doubts about the viability of LINQ to SQL as a data access layer (DAL) for business objects because of problems with LINQ to SQL and attaching Entities (8/12/2007). He also wonders about LINQ to SQL and Dynamic Queries and Expressions? (8/13/2007), but solves the problems with persisting changes to detached entities with a timestamp field in LINQ to SQL and Disconnected Entities Follow-up (8/15/2007). I'll be writing more about LINQ to SQL DALs for business objects in the near future.

Update 9/16/2007: C# MVP David Hayden is more optimistic about the future of LINQ to SQL as a DAL than Rick Strahl. He's been writing a series of posts about LINQ to SQL during the past three weeks. His recent emphasis is on replacing dynamic T-SQL queries with stored procedures. Here's the list in chronological order:

I've run into a corner using the LinqDataSource control with a stored procedure as the DataContext's data source. More follows about the problem in a separate post tomorrow.

Scott Guthrie has posted LINQ to SQL (Part 6 - Retrieving Data Using Stored Procedures), which describes the process of dragging SELECT * FROM TableName stored procs from Server Explorer and dropping them on one of the O/R Designer's entity class widgets to specify the type of the ISingleResult<EntityType> returned by the function that executes the stored proc. ISingleResult<EntityType> implements IEnumerable<T> but not ITable<TEntity>. Scott applies the ToList() method to bind ISingleResult<EntityType> to a read-only GridView control. What's required is a way to take advantage of partial methods to return an ITable<EntityType> for binding to a LinqDataControl and enable editing in ASP.NET GridView or DetailsView controls.

2 comments: