what I miss in LINQdatasource
ASP.NET SQLDatasource control was for me a super productive tool in the past. There are some small features missing like a more elegant data paging. ASP.NET 3.5 bring a new control LinqDatasource which have great support for data paging. So I tried to create a rss feed with LINQtoSQL and LinqDatasource. Result is not as I expected.
Caching
SQLDatasource supports data Caching with simply two attributes enablecaching=true and cacheduration=60. Caching makes applications much faster.
Filtering
In combination with caching SQLDatasource supports filterparameter which allow a kind of offline (from database) filtering. Also makes application faster and reduce load on SQL server.
FilterExpression="ProductName LIKE '@PN%'"
extended where conditions
As in the sample before i miss extended where condition in LINQ querys. The wizzard of LINQdatasource only allow a few expressions like ==.
In pure LINQ querys you can use syntax like
Dim expr = From hannes In kunden.Kundens _
Where hannes.City Like "a*" _
Select hannes
or even
Where SqlMethods.Like(hannes.City, "a%") _
Both doesn’t work in LINQdatasource.
Relations
For this point i am not sure if I miss some part. With sqldatasource I usually join data via SQL command. With LINqtoSQL you can define relations but not to handle it virtual as one “table” . With LINQ query's in code that's not a issue. LINQDatasource only allows to select one table so i can not handle the join of normalized data.
I am open for discussion at this point.