ModelConfigurationBuilder.CreateModelBuilder(ModelDependencies) Method

Definition

Creates the configured ModelBuilder used to create the model. This is done automatically when using OnModelCreating(ModelBuilder); this method allows it to be run explicitly in cases where the automatic execution is not possible.

public virtual Microsoft.EntityFrameworkCore.ModelBuilder CreateModelBuilder (Microsoft.EntityFrameworkCore.Infrastructure.ModelDependencies? modelDependencies);
abstract member CreateModelBuilder : Microsoft.EntityFrameworkCore.Infrastructure.ModelDependencies -> Microsoft.EntityFrameworkCore.ModelBuilder
override this.CreateModelBuilder : Microsoft.EntityFrameworkCore.Infrastructure.ModelDependencies -> Microsoft.EntityFrameworkCore.ModelBuilder
Public Overridable Function CreateModelBuilder (modelDependencies As ModelDependencies) As ModelBuilder

Parameters

modelDependencies
ModelDependencies

The dependencies object used during model building.

Returns

The configured ModelBuilder.

Remarks

See Pre-convention model building in EF Core for more information and examples.

Applies to