# Class NpgsqlSharedTableConvention

Namespace
  Npgsql.EntityFrameworkCore.PostgreSQL.Metadata.Conventions

Assembly
  Npgsql.EntityFrameworkCore.PostgreSQL.dll

A convention that manipulates names of database objects for entity types that share a table to avoid clashes.

    public class NpgsqlSharedTableConvention : SharedTableConvention, IModelFinalizingConvention, IConvention

Inheritance
  object
  SharedTableConvention
  NpgsqlSharedTableConvention

Implements
  IModelFinalizingConvention
  IConvention

Inherited Members
  SharedTableConvention.ProcessModelFinalizing(IConventionModelBuilder, IConventionContext<IConventionModelBuilder>)
  SharedTableConvention.AreCompatible(IReadOnlyKey, IReadOnlyKey, in StoreObjectIdentifier)
  SharedTableConvention.AreCompatible(IReadOnlyForeignKey, IReadOnlyForeignKey, in StoreObjectIdentifier)
  SharedTableConvention.AreCompatible(IReadOnlyCheckConstraint, IReadOnlyCheckConstraint, in StoreObjectIdentifier)
  SharedTableConvention.AreCompatible(IReadOnlyTrigger, IReadOnlyTrigger, in StoreObjectIdentifier)
  SharedTableConvention.Dependencies
  SharedTableConvention.RelationalDependencies
  SharedTableConvention.KeysUniqueAcrossTables
  SharedTableConvention.ForeignKeysUniqueAcrossTables
  SharedTableConvention.IndexesUniqueAcrossTables
  SharedTableConvention.TriggersUniqueAcrossTables
  object.Equals(object)
  object.Equals(object, object)
  object.GetHashCode()
  object.GetType()
  object.MemberwiseClone()
  object.ReferenceEquals(object, object)
  object.ToString()

## Constructors

### NpgsqlSharedTableConvention(ProviderConventionSetBuilderDependencies, RelationalConventionSetBuilderDependencies)

Creates a new instance of NpgsqlSharedTableConvention.

    public NpgsqlSharedTableConvention(ProviderConventionSetBuilderDependencies dependencies, RelationalConventionSetBuilderDependencies relationalDependencies)

#### Parameters

`dependencies` ProviderConventionSetBuilderDependencies

  Parameter object containing dependencies for this convention.

`relationalDependencies` RelationalConventionSetBuilderDependencies

  Parameter object containing relational dependencies for this convention.

## Properties

### CheckConstraintsUniqueAcrossTables

Gets a value indicating whether check constraint names should be unique across tables.

    protected override bool CheckConstraintsUniqueAcrossTables { get; }

#### Property Value

bool

## Methods

### AreCompatible(IReadOnlyIndex, IReadOnlyIndex, in StoreObjectIdentifier)

Gets a value indicating whether two indexes mapped to the same table index are compatible.

    protected override bool AreCompatible(IReadOnlyIndex index, IReadOnlyIndex duplicateIndex, in StoreObjectIdentifier storeObject)

#### Parameters

`index` IReadOnlyIndex

  An index.

`duplicateIndex` IReadOnlyIndex

  Another index.

`storeObject` StoreObjectIdentifier

  The identifier of the store object.

#### Returns

bool

  true if compatible