Επεξεργασία

SQL Server and ADO.NET

Download ADO.NET

Use this guide to find SQL Server-specific connection, data, and feature documentation for .NET applications.

Microsoft.Data.SqlClient

Microsoft.Data.SqlClient provides the ADO.NET driver for SQL Server, Azure SQL, and supported Microsoft Fabric SQL endpoints. It implements the Tabular Data Stream (TDS) protocol and exposes connections, commands, parameters, transactions, and data readers.

Start with Connect and query for a first application. Feature and authentication support depends on the target service; don't assume every SQL Server feature is available in a cloud endpoint.

Secure and reliable connections

Task Guide
Require encryption and validate the server's identity. Encryption and certificate validation
Choose Windows integrated or SQL password authentication. SQL Server and Windows authentication
Use managed identity, workload identity, user sign-in, or access tokens. Microsoft Entra authentication
Connect through failover and configure read-only routing. High availability and disaster recovery
Develop against a per-user SQL Server engine on Windows. LocalDB and local development
Review permissions, query construction, secrets, and logging. Security best practices

In this section

Topic Description
SQL Server security Database security features and application security guidance.
SQL Server data types and ADO.NET SQL Server data types and their .NET representations.
SQL Server binary and large-value data Binary, large-value, and FILESTREAM data.
SQL Server data operations in ADO.NET Bulk copy, multiple active result sets, asynchronous operations, and table-valued parameters.
SQL Server features and ADO.NET Database features used by SqlClient applications.

For engine configuration and administration, see SQL Server documentation.