Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions entity-framework/core/providers/sql-server/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,6 @@ builder.Services.AddDbContext<MyContext>(options =>
options.UseSqlServer(builder.Configuration.GetConnectionString("MyContext")));
```

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).

### [Azure SQL](#tab/azure-sql)

```c#
Expand Down Expand Up @@ -101,6 +99,8 @@ builder.Services.AddDbContext<MyContext>(options =>

***

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).

## Compatibility level

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.
Expand All @@ -110,7 +110,7 @@ Note that this only covers EF's own configuration of the compatibility level - a
To configure EF with a compatibility level, use `UseCompatibilityLevel()` as follows:

```c#
optionsBuilder.UseSqlServer("<CONNECTION STRING>", o => o.UseCompatibilityLevel());
optionsBuilder.UseSqlServer("<CONNECTION STRING>", o => o.UseCompatibilityLevel(170));
```

## Connection resiliency
Expand Down