Consolidated discussion: LinqDataSource or ObjectDataSource?

1.3k Views Asked by At

I've a moderate-scale web-app with an SQL-Server based backend DB.

My DB overview - Generic suggestions for SQL 2005 Framework\Design and Implementation

My App framework overview - L2S (LINQ to SQL) or EF (Entity Framework)

So, for now as we're on a fast-track development. We've 'frozen' migration to MVC architecture and to make it simpler/faster we've chosen LINQ-to-SQL over Entity-Framework (also considering the fact that in a few months a better Entity Framework v2.0 is coming). I hope this is right.

Now, as I revisited the old code - in past we've used ODS (objectDataSource) at all the places for Search & CRUD operations. So, is it a good idea to replace it with the new LinqDataSource (LDS).

I just found one useful post on stackoverflow: SqlDataSource vs ObjectDataSource

I've referred many LDS tutorials. A great 'series' I foun on CodeProject:

Part1: http://www.codeproject.com/KB/aspnet/LinqDataSourcebasics.aspx
Part2: http://www.codeproject.com/KB/aspnet/LinqDataSourcebasics1.aspx
Part3: http://www.codeproject.com/KB/aspnet/LinqDataSource2.aspx
Part4: http://www.codeproject.com/KB/aspnet/LinqDataSource3.aspx

I also visited several 'comparison' discussions like - (Good one) http://www.eggheadcafe.com/aspnet/how-to/146339/linqdatasource-vs-objectd.aspx

The famous ScouttGU's 5 part series on LINQ - http://weblogs.asp.net/scottgu/archive/2007/07/16/linq-to-sql-part-5-binding-ui-using-the-asp-linqdatasource-control.aspx

I can't go deeper - I need to know what do experts have to say about this. My inclination is towards using ODS because it provides better abstraction (unlike the (nearly)2-tier LDS). And for future MVC migration also this shud help to structure the app better.

Other Ref: http://www.dotnetspider.com/forum/165941-What-Difference-between-ObjectDataSource.aspx

1

There are 1 best solutions below

0
On BEST ANSWER

Hope this serves as a consolidated R&D for people looking to choose between the two. For me, its been a long time and now I'm using MVC3 and SQL Server as backend. So I've a L2S (LINQ to SQL) layer which helps me get the perfect "OR" mapping and allows me to manipulate things at object level instead of any other forms.

Entity Framework is good but L2S provides more control and is simpler (its like choosing between Win XP & Vista(EF)) I stayed with L2S and its been working like a charm!