LINQ to SQL vs ADO.Net

后端 未结 6 1946
悲哀的现实
悲哀的现实 2020-12-03 06:51

What\'s the difference between LINQ to SQL and ADO.net ?

6条回答
  •  生来不讨喜
    2020-12-03 07:19

    ADO.NET is a set of class libraries that provide basic data access infrastructure on top of .NET Basic Class Libraries. It also contains basic LINQ infrastructure, such as static class of Enumerable (that provide LINQ to Object) and an interface to do basic query against relational data such as IQueryable.

    LINQ to SQL is NOT a data access framework.

    ADO.NET can be assumed as a data access framework, but this can be misleading, since ADO.NET is not a standalone product. ADP.NET is truly a part of .NET Framework.

    LINQ to SQL is simply an implementation of LINQ to function as a data provider that connect and maps directly to SQL Server. Underneath LINQ to SQL, contains heavy usages of ADO.NET classes in System.Data.SqlClient namespace, so it's implemented on top of ADO.NET but focusing on and it's specific to accessing SQLServer.

提交回复
热议问题