# 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
  object
  NpgsqlPostgresModelFinalizingConvention

Implements
  IModelFinalizingConvention
  IConvention

Inherited Members
  object.Equals(object)
  object.Equals(object, object)
  object.GetHashCode()
  object.GetType()
  object.MemberwiseClone()
  object.ReferenceEquals(object, object)
  object.ToString()

## Remarks

See Model building conventions.

## Constructors

### NpgsqlPostgresModelFinalizingConvention(NpgsqlTypeMappingSource, IReadOnlyList<EnumDefinition>)

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

    public NpgsqlPostgresModelFinalizingConvention(NpgsqlTypeMappingSource typeMappingSource, IReadOnlyList<EnumDefinition> enumDefinitions)

#### Parameters

`typeMappingSource` NpgsqlTypeMappingSource
`enumDefinitions` IReadOnlyList<EnumDefinition>

#### Remarks

See Model building conventions.

## 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

### SetupEnums(IConventionModelBuilder)

Configures the model to create PostgreSQL enums based on the user's enum definitions in the context options.

    protected virtual void SetupEnums(IConventionModelBuilder modelBuilder)

#### Parameters

`modelBuilder` IConventionModelBuilder