共用方式為


ProviderCodeGenerator.GenerateUseProvider 方法

定義

多載

GenerateUseProvider(String)
已淘汰.

產生類似 的代碼 .UseSqlServer("Database=Foo") 段,可用於 OnConfiguring(DbContextOptionsBuilder) 所產生 DbCoNtext 的 方法中。

GenerateUseProvider(String, MethodCallCodeFragment)

產生類似 的代碼 .UseSqlServer("Database=Foo") 段,可用於 OnConfiguring(DbContextOptionsBuilder) 所產生 DbCoNtext 的 方法中。

GenerateUseProvider(String)

來源:
ProviderCodeGenerator.cs
來源:
ProviderCodeGenerator.cs
來源:
ProviderCodeGenerator.cs
來源:
ProviderCodeGenerator.cs
來源:
ProviderCodeGenerator.cs

警告

Use the overload that takes provider options instead.

產生類似 的代碼 .UseSqlServer("Database=Foo") 段,可用於 OnConfiguring(DbContextOptionsBuilder) 所產生 DbCoNtext 的 方法中。

public abstract Microsoft.EntityFrameworkCore.Design.MethodCallCodeFragment GenerateUseProvider (string connectionString);
[System.Obsolete("Use the overload that takes provider options instead.")]
public virtual Microsoft.EntityFrameworkCore.Design.MethodCallCodeFragment GenerateUseProvider (string connectionString);
public virtual Microsoft.EntityFrameworkCore.Design.MethodCallCodeFragment GenerateUseProvider (string connectionString);
abstract member GenerateUseProvider : string -> Microsoft.EntityFrameworkCore.Design.MethodCallCodeFragment
[<System.Obsolete("Use the overload that takes provider options instead.")>]
abstract member GenerateUseProvider : string -> Microsoft.EntityFrameworkCore.Design.MethodCallCodeFragment
override this.GenerateUseProvider : string -> Microsoft.EntityFrameworkCore.Design.MethodCallCodeFragment
abstract member GenerateUseProvider : string -> Microsoft.EntityFrameworkCore.Design.MethodCallCodeFragment
override this.GenerateUseProvider : string -> Microsoft.EntityFrameworkCore.Design.MethodCallCodeFragment
Public MustOverride Function GenerateUseProvider (connectionString As String) As MethodCallCodeFragment
Public Overridable Function GenerateUseProvider (connectionString As String) As MethodCallCodeFragment

參數

connectionString
String

要包含在程式碼片段中的連接字串。

傳回

程式碼片段。

實作

屬性

適用於

GenerateUseProvider(String, MethodCallCodeFragment)

來源:
ProviderCodeGenerator.cs
來源:
ProviderCodeGenerator.cs
來源:
ProviderCodeGenerator.cs
來源:
ProviderCodeGenerator.cs
來源:
ProviderCodeGenerator.cs
來源:
ProviderCodeGenerator.cs
來源:
ProviderCodeGenerator.cs
來源:
ProviderCodeGenerator.cs

產生類似 的代碼 .UseSqlServer("Database=Foo") 段,可用於 OnConfiguring(DbContextOptionsBuilder) 所產生 DbCoNtext 的 方法中。

public virtual Microsoft.EntityFrameworkCore.Design.MethodCallCodeFragment GenerateUseProvider (string connectionString, Microsoft.EntityFrameworkCore.Design.MethodCallCodeFragment providerOptions);
public abstract Microsoft.EntityFrameworkCore.Design.MethodCallCodeFragment GenerateUseProvider (string connectionString, Microsoft.EntityFrameworkCore.Design.MethodCallCodeFragment providerOptions);
public abstract Microsoft.EntityFrameworkCore.Design.MethodCallCodeFragment GenerateUseProvider (string connectionString, Microsoft.EntityFrameworkCore.Design.MethodCallCodeFragment? providerOptions);
abstract member GenerateUseProvider : string * Microsoft.EntityFrameworkCore.Design.MethodCallCodeFragment -> Microsoft.EntityFrameworkCore.Design.MethodCallCodeFragment
override this.GenerateUseProvider : string * Microsoft.EntityFrameworkCore.Design.MethodCallCodeFragment -> Microsoft.EntityFrameworkCore.Design.MethodCallCodeFragment
abstract member GenerateUseProvider : string * Microsoft.EntityFrameworkCore.Design.MethodCallCodeFragment -> Microsoft.EntityFrameworkCore.Design.MethodCallCodeFragment
Public Overridable Function GenerateUseProvider (connectionString As String, providerOptions As MethodCallCodeFragment) As MethodCallCodeFragment
Public MustOverride Function GenerateUseProvider (connectionString As String, providerOptions As MethodCallCodeFragment) As MethodCallCodeFragment

參數

connectionString
String

要包含在程式碼片段中的連接字串。

providerOptions
MethodCallCodeFragment

用來設定提供者選項的方法鏈結。

傳回

程式碼片段。

實作

適用於