Skip to content

Commit efdf603

Browse files
Merge pull request #5239 from dotnet/main
Auto Publish – main to live - 2026-01-12 17:00 UTC
2 parents 5d3053c + c1fcd93 commit efdf603

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

  • entity-framework/core/providers/sql-server

entity-framework/core/providers/sql-server/index.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -51,8 +51,6 @@ builder.Services.AddDbContext<MyContext>(options =>
5151
options.UseSqlServer(builder.Configuration.GetConnectionString("MyContext")));
5252
```
5353

54-
The EF SQL Server provider uses [Microsoft.Data.SqlClient](/sql/connect/ado-net/overview-sqlclient-driver) as its underlying ADO.NET provider. For more information on the connection strings accepted by SqlClient, [see this page](/sql/connect/ado-net/connection-string-syntax).
55-
5654
### [Azure SQL](#tab/azure-sql)
5755

5856
```c#
@@ -101,6 +99,8 @@ builder.Services.AddDbContext<MyContext>(options =>
10199
102100
***
103101

102+
The EF SQL Server provider uses [Microsoft.Data.SqlClient](/sql/connect/ado-net/overview-sqlclient-driver) as its underlying ADO.NET provider. For more information on the connection strings accepted by SqlClient, [see this page](/sql/connect/ado-net/connection-string-syntax).
103+
104104
## Compatibility level
105105

106106
You can optionally configure EF with the compatibility level of your database; higher compatibility levels allow for newer features, and configuring EF accordingly makes it use those features. If you do not explicitly configure a compatibility level, a reasonable default will be chosen that may not take advantage of the newest features. As a result, it's recommended to explicitly configure the compatibility level you'd like to have.
@@ -110,7 +110,7 @@ Note that this only covers EF's own configuration of the compatibility level - a
110110
To configure EF with a compatibility level, use `UseCompatibilityLevel()` as follows:
111111

112112
```c#
113-
optionsBuilder.UseSqlServer("<CONNECTION STRING>", o => o.UseCompatibilityLevel());
113+
optionsBuilder.UseSqlServer("<CONNECTION STRING>", o => o.UseCompatibilityLevel(170));
114114
```
115115

116116
## Connection resiliency

0 commit comments

Comments
 (0)