次の方法で共有


SqlServerDbContextOptionsBuilder.UseCompatibilityLevel(Int32) メソッド

定義

EF Core がデータベースと対話するときに使用するSQL Server互換性レベルを設定します。 これにより、EF Core を構成して、古い (またはそれ以降の) バージョンのSQL Serverを操作できます。 既定値は (160SQL Server 2022) です。

public virtual Microsoft.EntityFrameworkCore.Infrastructure.SqlServerDbContextOptionsBuilder UseCompatibilityLevel (int compatibilityLevel);
abstract member UseCompatibilityLevel : int -> Microsoft.EntityFrameworkCore.Infrastructure.SqlServerDbContextOptionsBuilder
override this.UseCompatibilityLevel : int -> Microsoft.EntityFrameworkCore.Infrastructure.SqlServerDbContextOptionsBuilder
Public Overridable Function UseCompatibilityLevel (compatibilityLevel As Integer) As SqlServerDbContextOptionsBuilder

パラメーター

compatibilityLevel
Int32

false null リソースを持つ場合

戻り値

注釈

詳細と例については、「DbContextOptions の使用」および互換性レベルに関するSQL Serverドキュメントを参照してください。

適用対象