IProviderConfigurationCodeGenerator Interface

Definition

A service typically implemented by database providers to generate code fragments for reverse engineering.

public interface IProviderConfigurationCodeGenerator
type IProviderConfigurationCodeGenerator = interface
Public Interface IProviderConfigurationCodeGenerator
Derived

Remarks

The service lifetime is Singleton. This means a single instance is used by many DbContext instances. The implementation must be thread-safe. This service cannot depend on services registered as Scoped.

See Reverse engineering (scaffolding) an existing database, and EF Core design-time services for more information and examples.

Methods

GenerateContextOptions()

Generates a method chain to configure additional context options.

GenerateProviderOptions()

Generates a method chain used to configure provider-specific options.

GenerateUseProvider(String)
Obsolete.

Generates a code fragment like .UseSqlServer("Database=Foo") which can be used in the OnConfiguring(DbContextOptionsBuilder) method of the generated DbContext.

GenerateUseProvider(String, MethodCallCodeFragment)

Generates a code fragment like .UseSqlServer("Database=Foo") which can be used in the OnConfiguring(DbContextOptionsBuilder) method of the generated DbContext.

Applies to