Using ADO.NET
When Microsoft first created .NET, it had one data access technology, and it was named ADO.NET. Since then, Microsoft has added additional technologies but reused the name ADO.NET, so it can get confusing. The following are your two main choices today:
ADO.NET: This is the original .NET data access technology that has classes that inherit from abstract base classes such as
DbConnection
andDbDataReader
. I often refer to this as classic ADO.NET.ADO.NET Entity Framework: This is a layer on top of ADO.NET that adds object-relational mapping (ORM) capabilities. I often refer to this as Entity Framework or just EF.
Tip
Both are supported on .NET Core. Use classic ADO.NET for performance, to maintain existing code that already uses it, and when your tables must always be accessed through stored procedures instead of directly. Use Entity Framework when developer productivity is more important than performance and when you are allowed to execute dynamically generated SQL statements...