Compartilhar via


IProviderConfigurationCodeGenerator.GenerateUseProvider Método

Definição

Sobrecargas

GenerateUseProvider(String)
Obsoleto.

Gera um fragmento de código como .UseSqlServer("Database=Foo") o que pode ser usado no OnConfiguring(DbContextOptionsBuilder) método do DbContext gerado.

GenerateUseProvider(String, MethodCallCodeFragment)

Gera um fragmento de código como .UseSqlServer("Database=Foo") o que pode ser usado no OnConfiguring(DbContextOptionsBuilder) método do DbContext gerado.

GenerateUseProvider(String)

Origem:
IProviderConfigurationCodeGenerator.cs
Origem:
IProviderConfigurationCodeGenerator.cs
Origem:
IProviderConfigurationCodeGenerator.cs
Origem:
IProviderConfigurationCodeGenerator.cs
Origem:
IProviderConfigurationCodeGenerator.cs

Cuidado

Use the overload that takes provider options instead.

Gera um fragmento de código como .UseSqlServer("Database=Foo") o que pode ser usado no OnConfiguring(DbContextOptionsBuilder) método do DbContext gerado.

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

Parâmetros

connectionString
String

A cadeia de conexão a ser incluída no fragmento de código.

Retornos

O fragmento de código.

Atributos

Aplica-se a

GenerateUseProvider(String, MethodCallCodeFragment)

Origem:
IProviderConfigurationCodeGenerator.cs
Origem:
IProviderConfigurationCodeGenerator.cs
Origem:
IProviderConfigurationCodeGenerator.cs
Origem:
IProviderConfigurationCodeGenerator.cs
Origem:
IProviderConfigurationCodeGenerator.cs

Gera um fragmento de código como .UseSqlServer("Database=Foo") o que pode ser usado no OnConfiguring(DbContextOptionsBuilder) método do DbContext gerado.

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

Parâmetros

connectionString
String

A cadeia de conexão a ser incluída no fragmento de código.

providerOptions
MethodCallCodeFragment

A cadeia de métodos usada para configurar as opções do provedor.

Retornos

O fragmento de código.

Aplica-se a