I'm debating what technology to use for an upcoming ASP.NET project.
Assumptions:
Options:
Write stored procedures and call them with ADO.NET. I can still use LinqToObjects once I'm done populating my DataSet
.
Leverage what I know of Linq already to learn LinqToSql.
Analysis:
I already know how to do option 1, but I'd really like to use Linq exclusively. The problem with option 2 is that, according to everything I've read, LinqToSql will probably be deprecated in favor of Entity Framework.
Questions:
How steep is the learning curve for LinqToSql if you're already familiar with other Linq technologies?
Is it worth investing any time in learning LinqToSql given that it may not be further developed by Microsoft?
Will understanding LinqToSql help me to one day understand Entity Framework or are they too different?
Ultimately, which option would you recommend for my situation?
Update:
I don't want this to get lost in the comments: marc_s pointed out that LinqToSql is being further developed, at least as of .NET 4.0. Link: http://damieng.com/blog/2009/06/01/linq-to-sql-changes-in-net-40.
I don't know if this means LinqToSql has a future after all, but it does make learning that technology a little more appealing.
One thing I didn't ask in my original post but should have: Are the flaws in Entity Framework likely to affect this project?
Thanks for the answers so far.
Further Analysis
Here is a list of LinqToSql drawbacks, based on some of the comments below:
Of these, item 1 is the greatest concern to me. Even with a small project, change is inevitable. I remember once trying to use the Windows Forms designer to map to a database, and it blew up in my face so many times, I abandoned it in favor of rolling my own ADO.NET helper classes.
However, it does seem like SqlMetal might be able to handle my needs perfectly. I run a command, it regenerates everything from scratch from the database, I'm done. If I keep my database simple (just tables--no stored procedures, views, or functions), perhaps SqlMetal is all I'll need.
LINQ to Sql is pretty straightforward if you already know LINQ to Xml or objects (Linq "objects" are just "lists")...
Linq To Sql is not deprecated by Microsoft, they just suggest to go with EF. It won't be upgraded.
Linq To Sql could be seen almost similar to EF. With EF you could do more complicated things, but at the base level is almost the same (for your site with 7 tables it doesn't make any difference).
For your situation I suggest to go with LINQ. It's fun and more rapid than SP + ADO.NET. Using a ORM in nowadays is almost a good choice. Not using it should be the exception (to me).
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With