开发者

Is it worth a try LINQ to SQL as a beginner to an ORM?

开发者 https://www.devze.com 2022-12-24 19:17 出处:网络
Thus far used sql server stored procedures for all my web applications... Now thought of m开发者_运维问答oving to an ORM... I would like to ask SO users about LINQ to SQL

Thus far used sql server stored procedures for all my web applications... Now thought of m开发者_运维问答oving to an ORM... I would like to ask SO users about LINQ to SQL

Is Linq to sql worth a try as a beginner to an ORM?

or should i look for some others... Any suggestion...

EDIT:

I have a sql server 2005 database with all tables....

How to use this db with Linq to sql?


Coming from using ADO.NET table adapters, LINQ was a revelation. A breath of fresh air. The veil was lifted. A new day dawned. And so on and such forth.

Start with Scott Gu's series here and check all his other blogs on the subject.

I envy you your impending joy.


Skip it. Second grade little ORM missing all the interesting features (and don't get me even started with EntityFramework - crap in v1, barely usable in v2).

I suggest getting ahold of NHibernate.


Even though I, unfortunately, don't do much Windows/.NET development anymore, I still think that C#/.NET is the best programming environment around and that Linq is a great ORM. If you're on the .NET/C# platform, use it. There's good documentation, a large community of users to help you, and very solid implementations.

While Microsoft SQL Server doesn't get a lot of buzz, it is a very worthy database to be the platform underlying linq.


If you're just starting, then I recommend you ignore LINQ to SQL. Microsoft will be placing all of their development efforts behind Entity Framework, which is more powerful and general than LINQ to SQL.


Coming from a similar situation I found linq-to-sql worked really well. We previously used a repository pattern and managed to follow it pretty closely with linq to sql in about half the time. Linq-to-Sql will also allow you to write and use regular store procedures.

For a beginner I found the linq-to-sql sections of the Nerd Dinner tutorial a good starting point.


Personally, I think that L2S is a great choice for a ORM beginner because it's really easy to use, but still gives you plenty of power. IMO, if you are doing new SQL Server work, L2S is the best and easiest ORM available. It's not perfect, but neither is anything else out there.

Also, PLINQO adds a lot of the missing features to L2S that bring it more in line with EF, while maintaining the simplicity and speed of L2S.

0

精彩评论

暂无评论...
验证码 换一张
取 消