Partager via


ProviderCodeGenerator.GenerateUseProvider Méthode

Définition

Surcharges

GenerateUseProvider(String)
Obsolète.

Génère un fragment de code comme .UseSqlServer("Database=Foo") qui peut être utilisé dans la OnConfiguring(DbContextOptionsBuilder) méthode du DbContext généré.

GenerateUseProvider(String, MethodCallCodeFragment)

Génère un fragment de code comme .UseSqlServer("Database=Foo") qui peut être utilisé dans la OnConfiguring(DbContextOptionsBuilder) méthode du DbContext généré.

GenerateUseProvider(String)

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

Attention

Use the overload that takes provider options instead.

Génère un fragment de code comme .UseSqlServer("Database=Foo") qui peut être utilisé dans la OnConfiguring(DbContextOptionsBuilder) méthode du DbContext généré.

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

Paramètres

connectionString
String

Chaîne de connexion à inclure dans le fragment de code.

Retours

Fragment de code.

Implémente

Attributs

S’applique à

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

Génère un fragment de code comme .UseSqlServer("Database=Foo") qui peut être utilisé dans la OnConfiguring(DbContextOptionsBuilder) méthode du DbContext généré.

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

Paramètres

connectionString
String

Chaîne de connexion à inclure dans le fragment de code.

providerOptions
MethodCallCodeFragment

Chaîne de méthodes utilisée pour configurer les options du fournisseur.

Retours

Fragment de code.

Implémente

S’applique à