Compartir a través de


ProviderCodeGenerator.GenerateUseProvider Método

Definición

Sobrecargas

GenerateUseProvider(String)
Obsoletos.

Genera un fragmento de código como .UseSqlServer("Database=Foo") el que se puede usar en el OnConfiguring(DbContextOptionsBuilder) método de DbContext generado.

GenerateUseProvider(String, MethodCallCodeFragment)

Genera un fragmento de código como .UseSqlServer("Database=Foo") el que se puede usar en el OnConfiguring(DbContextOptionsBuilder) método de DbContext generado.

GenerateUseProvider(String)

Source:
ProviderCodeGenerator.cs
Source:
ProviderCodeGenerator.cs
Source:
ProviderCodeGenerator.cs
Source:
ProviderCodeGenerator.cs
Source:
ProviderCodeGenerator.cs

Precaución

Use the overload that takes provider options instead.

Genera un fragmento de código como .UseSqlServer("Database=Foo") el que se puede usar en el OnConfiguring(DbContextOptionsBuilder) método de DbContext generado.

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

Parámetros

connectionString
String

Cadena de conexión que se va a incluir en el fragmento de código.

Devoluciones

Fragmento de código.

Implementaciones

Atributos

Se aplica a

GenerateUseProvider(String, MethodCallCodeFragment)

Source:
ProviderCodeGenerator.cs
Source:
ProviderCodeGenerator.cs
Source:
ProviderCodeGenerator.cs
Source:
ProviderCodeGenerator.cs
Source:
ProviderCodeGenerator.cs
Source:
ProviderCodeGenerator.cs
Source:
ProviderCodeGenerator.cs
Source:
ProviderCodeGenerator.cs

Genera un fragmento de código como .UseSqlServer("Database=Foo") el que se puede usar en el OnConfiguring(DbContextOptionsBuilder) método de DbContext generado.

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

Parámetros

connectionString
String

Cadena de conexión que se va a incluir en el fragmento de código.

providerOptions
MethodCallCodeFragment

Cadena de métodos usada para configurar las opciones del proveedor.

Devoluciones

Fragmento de código.

Implementaciones

Se aplica a