Table of Contents

Class NpgsqlPostgresModelFinalizingConvention

Namespace
Npgsql.EntityFrameworkCore.PostgreSQL.Metadata.Conventions
Assembly
Npgsql.EntityFrameworkCore.PostgreSQL.dll

A convention that discovers certain common PostgreSQL extensions based on store types used in the model (e.g. hstore).

public class NpgsqlPostgresModelFinalizingConvention : IModelFinalizingConvention, IConvention
Inheritance
NpgsqlPostgresModelFinalizingConvention
Implements
Inherited Members

Remarks

Constructors

NpgsqlPostgresModelFinalizingConvention(IRelationalTypeMappingSource)

Creates a new instance of NpgsqlPostgresModelFinalizingConvention.

public NpgsqlPostgresModelFinalizingConvention(IRelationalTypeMappingSource typeMappingSource)

Parameters

typeMappingSource IRelationalTypeMappingSource

The type mapping source to use.

Methods

DiscoverPostgresExtensions(IConventionProperty, RelationalTypeMapping, IConventionModelBuilder)

Discovers certain common PostgreSQL extensions based on property store types (e.g. hstore).

protected virtual void DiscoverPostgresExtensions(IConventionProperty property, RelationalTypeMapping typeMapping, IConventionModelBuilder modelBuilder)

Parameters

property IConventionProperty
typeMapping RelationalTypeMapping
modelBuilder IConventionModelBuilder

ProcessModelFinalizing(IConventionModelBuilder, IConventionContext<IConventionModelBuilder>)

Called when a model is being finalized.

public virtual void ProcessModelFinalizing(IConventionModelBuilder modelBuilder, IConventionContext<IConventionModelBuilder> context)

Parameters

modelBuilder IConventionModelBuilder

The builder for the model.

context IConventionContext<IConventionModelBuilder>

Additional information associated with convention execution.

ProcessRowVersionProperty(IConventionProperty, RelationalTypeMapping)

Detects properties which are uint, OnAddOrUpdate and configured as concurrency tokens, and maps these to the PostgreSQL internal "xmin" column, which changes every time the row is modified.

protected virtual void ProcessRowVersionProperty(IConventionProperty property, RelationalTypeMapping typeMapping)

Parameters

property IConventionProperty
typeMapping RelationalTypeMapping