# 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.AreCompatibleDefaultConstraints(IReadOnlyProperty, IReadOnlyProperty, in StoreObjectIdentifier)
  SharedTableConvention.AreCompatible(IReadOnlyTrigger, IReadOnlyTrigger, in StoreObjectIdentifier)
  SharedTableConvention.Dependencies
  SharedTableConvention.RelationalDependencies
  SharedTableConvention.TriggersUniqueAcrossTables
  SharedTableConvention.DefaultConstraintsUniqueAcrossTables
  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

### ForeignKeysUniqueAcrossTables

Gets a value indicating whether foreign key names should be unique across tables.

    protected override bool ForeignKeysUniqueAcrossTables { get; }

#### Property Value

bool

### IndexesUniqueAcrossTables

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

    protected override bool IndexesUniqueAcrossTables { get; }

#### Property Value

bool

### KeysUniqueAcrossTables

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

    protected override bool KeysUniqueAcrossTables { 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