ModelBuilder.FinalizeModel Method

Definition

Forces post-processing on the model such that it is ready for use by the runtime. This post-processing happens automatically when using OnModelCreating(ModelBuilder); this method allows it to be run explicitly in cases where the automatic execution is not possible.

C#
public virtual Microsoft.EntityFrameworkCore.Metadata.IModel FinalizeModel ();

Returns

The finalized model.

Applies to

Product Versions
Entity Framework Core 2.2, 3.0, 3.1, 5.0, 6.0, 7.0, 8.0, 9.0