共用方式為


IProviderConfigurationCodeGenerator.GenerateUseProvider 方法

定義

多載

GenerateUseProvider(String)
已淘汰.

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

GenerateUseProvider(String, MethodCallCodeFragment)

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

GenerateUseProvider(String)

來源:
IProviderConfigurationCodeGenerator.cs
來源:
IProviderConfigurationCodeGenerator.cs
來源:
IProviderConfigurationCodeGenerator.cs
來源:
IProviderConfigurationCodeGenerator.cs
來源:
IProviderConfigurationCodeGenerator.cs

警告

Use the overload that takes provider options instead.

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

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

參數

connectionString
String

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

傳回

程式碼片段。

屬性

適用於

GenerateUseProvider(String, MethodCallCodeFragment)

來源:
IProviderConfigurationCodeGenerator.cs
來源:
IProviderConfigurationCodeGenerator.cs
來源:
IProviderConfigurationCodeGenerator.cs
來源:
IProviderConfigurationCodeGenerator.cs
來源:
IProviderConfigurationCodeGenerator.cs

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

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

參數

connectionString
String

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

providerOptions
MethodCallCodeFragment

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

傳回

程式碼片段。

適用於