LINQ to SQL or classic ADO.NET?

I ask myself many times before starting to write a new application or data access library, should I use LINQ to SQL or classic ADO.net, I used both and development time, which I spend on creating an application with LINQ, so that SQL looks like 1/3 compared to ADO.net.

The only thing I like about LINQ to SQL is that I don’t need to create the domain objects that LINQ does for me and saves me from wasting time on boring things: P But LINQ to SQL is suitable for large-scale projects, there is Is There Overhead That You Can Avoid When Using ADO.net?

+3
source share
7 answers

I like LINQ to SQL; Easy to work with your data model. If you have .NET 4, consider using the ADO.NET Entity Framework as your future, and it supports multiple databases.

There is little overhead with LINQ to SQL if you use LINQ queries on your database, but I think this is not significant in most cases. We have good performance. In addition, it supports stored procedures, so you always have the opportunity to return in terms of performance.

+4
source

Personally, I would not return to ADO.NET for DAL. However, remember that with Linq2Sql you are tied to MS SQL Server, which, I think, is unacceptable.

, DAL/ORM, NHibernate, SubSonic, Entity Framework (MS), LightSpeed, Castle ActiveRecord ( NHibernate). (, NHibernate Entity Framework) Linq.

+4

1/3 LINQ-to-SQL, 2/3 , , , .

+1

- 2,5 , L2S . . , LINQ. , . , , . , , .

+1

LINQ to SQL , Microsoft, Microsoft . Entity Framework LINQ to SQL , 2008 ( 2010 ).

ADO.NET , . , , , , . LINQ Entities Entity Framework Oracle. LINQ to SQL .

+1

See this . If you saved time and made your work easier, is it worth it? If you do not know the specific problems that you can solve by manually encoding data access, I would not worry.

0
source

There is no reason for ADO.NET compared to Linq to SQL

0
source

Source: https://habr.com/ru/post/1750104/


All Articles