IScaffoldingProviderCodeGenerator.GenerateUseProvider(String, String) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Caution
Use IProviderCodeGenerator.GenerateUseProvider instead.
Generates a code fragment like .UseSqlServer("Database=Foo")
which can be used in
the OnConfiguring(DbContextOptionsBuilder) method of the generated DbContext.
public string GenerateUseProvider (string connectionString, string language);
[System.Obsolete("Use IProviderCodeGenerator.GenerateUseProvider instead.")]
public string GenerateUseProvider (string connectionString, string language);
abstract member GenerateUseProvider : string * string -> string
[<System.Obsolete("Use IProviderCodeGenerator.GenerateUseProvider instead.")>]
abstract member GenerateUseProvider : string * string -> string
Public Function GenerateUseProvider (connectionString As String, language As String) As String
Parameters
- connectionString
- String
The connection string to include in the code fragment.
- language
- String
The programming language to generate, such as 'CSharp'.
Returns
The code fragment, or null
if the programming language is not supported.
- Attributes
Applies to
Entity Framework