This guide is meant to cover all namespace changes needed in client applications when porting SqlClient references to Microsoft.Data.SqlClient:
| Namespace Change | Applicability |
|---|---|
using System.Data.SqlClient;using Microsoft.Data.SqlClient; |
Applicable to all classes, enums and delegates. |
using Microsoft.SqlServer.Server;using Microsoft.Data.SqlClient.Server; |
Applicable Classes: InvalidUdtExceptionSqlDataRecordSqlFunctionAttributeSqlMetaDataSqlMethodAttributeSqlUserDefinedAggregateAttributeSqlUserDefinedTypeAttributeApplicable Interfaces: IBinarySerializeApplicable Enums: DataAccessKindFormatSystemDataAccessKind |
using System.Data.SqlTypes;using Microsoft.Data.SqlTypes; |
Applicable Classes:SqlFileStream |
using System.Data.Sql;using Microsoft.Data.Sql; |
Applicable Classes:SqlNotificationRequest |
using System.Data;using Microsoft.Data; |
Applicable Classes:OperationAbortedException |
We would love the SqlClient community to help enhance this cheat sheet by contributing experiences and challenges faced when porting their applications.