# Class NpgsqlModelValidator

Namespace
  Npgsql.EntityFrameworkCore.PostgreSQL.Infrastructure.Internal

Assembly
  Npgsql.EntityFrameworkCore.PostgreSQL.dll

This is an internal API that supports the Entity Framework Core infrastructure and not subject to the same compatibility standards as public APIs. It may be changed or removed without notice in any release. You should only use it directly in your code with extreme caution and knowing that doing so can result in application failures when updating to a new Entity Framework Core release.

    public class NpgsqlModelValidator : RelationalModelValidator, IModelValidator

Inheritance
  object
  ModelValidator
  RelationalModelValidator
  NpgsqlModelValidator

Implements
  IModelValidator

Inherited Members
  RelationalModelValidator.ValidateSqlQueries(IModel, IDiagnosticsLogger<DbLoggerCategory.Model.Validation>)
  RelationalModelValidator.ValidateDbFunctions(IModel, IDiagnosticsLogger<DbLoggerCategory.Model.Validation>)
  RelationalModelValidator.ValidateBoolsWithDefaults(IModel, IDiagnosticsLogger<DbLoggerCategory.Model.Validation>)
  RelationalModelValidator.ValidateDefaultValuesOnKeys(IModel, IDiagnosticsLogger<DbLoggerCategory.Model.Validation>)
  RelationalModelValidator.ValidateNoMutableKeys(IModel, IDiagnosticsLogger<DbLoggerCategory.Model.Validation>)
  RelationalModelValidator.ValidateSharedTableCompatibility(IModel, IDiagnosticsLogger<DbLoggerCategory.Model.Validation>)
  RelationalModelValidator.ValidateSharedTableCompatibility(IReadOnlyList<IEntityType>, in StoreObjectIdentifier, IDiagnosticsLogger<DbLoggerCategory.Model.Validation>)
  RelationalModelValidator.ValidateSharedViewCompatibility(IModel, IDiagnosticsLogger<DbLoggerCategory.Model.Validation>)
  RelationalModelValidator.ValidateSharedViewCompatibility(IReadOnlyList<IEntityType>, string, string, IDiagnosticsLogger<DbLoggerCategory.Model.Validation>)
  RelationalModelValidator.ValidateSharedColumnsCompatibility(IReadOnlyList<IEntityType>, in StoreObjectIdentifier, IDiagnosticsLogger<DbLoggerCategory.Model.Validation>)
  RelationalModelValidator.GetDefaultColumnValue(IProperty, in StoreObjectIdentifier)
  RelationalModelValidator.ValidateSharedForeignKeysCompatibility(IReadOnlyList<IEntityType>, in StoreObjectIdentifier, IDiagnosticsLogger<DbLoggerCategory.Model.Validation>)
  RelationalModelValidator.ValidateCompatible(IForeignKey, IForeignKey, string, in StoreObjectIdentifier, IDiagnosticsLogger<DbLoggerCategory.Model.Validation>)
  RelationalModelValidator.ValidateSharedIndexesCompatibility(IReadOnlyList<IEntityType>, in StoreObjectIdentifier, IDiagnosticsLogger<DbLoggerCategory.Model.Validation>)
  RelationalModelValidator.ValidateCompatible(IIndex, IIndex, string, in StoreObjectIdentifier, IDiagnosticsLogger<DbLoggerCategory.Model.Validation>)
  RelationalModelValidator.ValidateSharedKeysCompatibility(IReadOnlyList<IEntityType>, in StoreObjectIdentifier, IDiagnosticsLogger<DbLoggerCategory.Model.Validation>)
  RelationalModelValidator.ValidateCompatible(IKey, IKey, string, in StoreObjectIdentifier, IDiagnosticsLogger<DbLoggerCategory.Model.Validation>)
  RelationalModelValidator.ValidateSharedCheckConstraintCompatibility(IReadOnlyList<IEntityType>, in StoreObjectIdentifier, IDiagnosticsLogger<DbLoggerCategory.Model.Validation>)
  RelationalModelValidator.ValidateCompatible(ICheckConstraint, ICheckConstraint, string, in StoreObjectIdentifier, IDiagnosticsLogger<DbLoggerCategory.Model.Validation>)
  RelationalModelValidator.ValidateSharedTriggerCompatibility(IReadOnlyList<IEntityType>, in StoreObjectIdentifier, IDiagnosticsLogger<DbLoggerCategory.Model.Validation>)
  RelationalModelValidator.ValidateCompatible(ITrigger, ITrigger, string, in StoreObjectIdentifier, IDiagnosticsLogger<DbLoggerCategory.Model.Validation>)
  RelationalModelValidator.ValidateInheritanceMapping(IModel, IDiagnosticsLogger<DbLoggerCategory.Model.Validation>)
  RelationalModelValidator.ValidateMappingStrategy(IEntityType, string)
  RelationalModelValidator.IsRedundant(IForeignKey)
  RelationalModelValidator.ValidateMappingFragments(IModel, IDiagnosticsLogger<DbLoggerCategory.Model.Validation>)
  RelationalModelValidator.ValidatePropertyOverrides(IModel, IDiagnosticsLogger<DbLoggerCategory.Model.Validation>)
  RelationalModelValidator.ValidateIndexProperties(IModel, IDiagnosticsLogger<DbLoggerCategory.Model.Validation>)
  RelationalModelValidator.ValidateData(IModel, IDiagnosticsLogger<DbLoggerCategory.Model.Validation>)
  RelationalModelValidator.ValidateTriggers(IModel, IDiagnosticsLogger<DbLoggerCategory.Model.Validation>)
  RelationalModelValidator.ValidateJsonEntities(IModel, IDiagnosticsLogger<DbLoggerCategory.Model.Validation>)
  RelationalModelValidator.ValidateJsonEntityRoot(in StoreObjectIdentifier, IEntityType)
  RelationalModelValidator.ValidateJsonEntityNavigations(in StoreObjectIdentifier, IEntityType)
  RelationalModelValidator.ValidateJsonEntityKey(in StoreObjectIdentifier, IEntityType)
  RelationalModelValidator.ValidateJsonEntityProperties(in StoreObjectIdentifier, IEntityType)
  RelationalModelValidator.ThrowPropertyNotMappedException(string, IConventionTypeBase, IConventionProperty)
  RelationalModelValidator.RelationalDependencies
  ModelValidator.ValidateRelationships(IModel, IDiagnosticsLogger<DbLoggerCategory.Model.Validation>)
  ModelValidator.ValidatePropertyMapping(IModel, IDiagnosticsLogger<DbLoggerCategory.Model.Validation>)
  ModelValidator.IsOwned(Type, IConventionModel)
  ModelValidator.ValidateIgnoredMembers(IModel, IDiagnosticsLogger<DbLoggerCategory.Model.Validation>)
  ModelValidator.ValidateNoShadowKeys(IModel, IDiagnosticsLogger<DbLoggerCategory.Model.Validation>)
  ModelValidator.ValidateNoCycles(IModel, IDiagnosticsLogger<DbLoggerCategory.Model.Validation>)
  ModelValidator.ValidateNonNullPrimaryKeys(IModel, IDiagnosticsLogger<DbLoggerCategory.Model.Validation>)
  ModelValidator.ValidateClrInheritance(IModel, IDiagnosticsLogger<DbLoggerCategory.Model.Validation>)
  ModelValidator.ValidateDiscriminatorValues(IEntityType)
  ModelValidator.ValidateChangeTrackingStrategy(IModel, IDiagnosticsLogger<DbLoggerCategory.Model.Validation>)
  ModelValidator.ValidateOwnership(IModel, IDiagnosticsLogger<DbLoggerCategory.Model.Validation>)
  ModelValidator.ValidateForeignKeys(IModel, IDiagnosticsLogger<DbLoggerCategory.Model.Validation>)
  ModelValidator.ValidateFieldMapping(IModel, IDiagnosticsLogger<DbLoggerCategory.Model.Validation>)
  ModelValidator.ValidateTypeMappings(IModel, IDiagnosticsLogger<DbLoggerCategory.Model.Validation>)
  ModelValidator.ValidatePrimitiveCollections(IModel, IDiagnosticsLogger<DbLoggerCategory.Model.Validation>)
  ModelValidator.ValidateQueryFilters(IModel, IDiagnosticsLogger<DbLoggerCategory.Model.Validation>)
  ModelValidator.LogShadowProperties(IModel, IDiagnosticsLogger<DbLoggerCategory.Model.Validation>)
  ModelValidator.Dependencies
  object.Equals(object)
  object.Equals(object, object)
  object.GetHashCode()
  object.GetType()
  object.MemberwiseClone()
  object.ReferenceEquals(object, object)
  object.ToString()

## Constructors

### NpgsqlModelValidator(ModelValidatorDependencies, RelationalModelValidatorDependencies, INpgsqlSingletonOptions)

This is an internal API that supports the Entity Framework Core infrastructure and not subject to the same compatibility standards as public APIs. It may be changed or removed without notice in any release. You should only use it directly in your code with extreme caution and knowing that doing so can result in application failures when updating to a new Entity Framework Core release.

    public NpgsqlModelValidator(ModelValidatorDependencies dependencies, RelationalModelValidatorDependencies relationalDependencies, INpgsqlSingletonOptions npgsqlSingletonOptions)

#### Parameters

`dependencies` ModelValidatorDependencies
`relationalDependencies` RelationalModelValidatorDependencies
`npgsqlSingletonOptions` INpgsqlSingletonOptions

## Methods

### Validate(IModel, IDiagnosticsLogger<Validation>)

This is an internal API that supports the Entity Framework Core infrastructure and not subject to the same compatibility standards as public APIs. It may be changed or removed without notice in any release. You should only use it directly in your code with extreme caution and knowing that doing so can result in application failures when updating to a new Entity Framework Core release.

    public override void Validate(IModel model, IDiagnosticsLogger<DbLoggerCategory.Model.Validation> logger)

#### Parameters

`model` IModel
`logger` IDiagnosticsLogger<DbLoggerCategory.Model.Validation>

### ValidateCompatible(IProperty, IProperty, string, in StoreObjectIdentifier, IDiagnosticsLogger<Validation>)

Validates the compatibility of two properties mapped to the same column.

    protected override void ValidateCompatible(IProperty property, IProperty duplicateProperty, string columnName, in StoreObjectIdentifier storeObject, IDiagnosticsLogger<DbLoggerCategory.Model.Validation> logger)

#### Parameters

`property` IProperty

  A property.

`duplicateProperty` IProperty

  Another property.

`columnName` string

  The column name.

`storeObject` StoreObjectIdentifier

  The identifier of the store object.

`logger` IDiagnosticsLogger<DbLoggerCategory.Model.Validation>

  The logger to use.

### ValidateIdentityVersionCompatibility(IModel)

Validates that identity columns are used only with PostgreSQL 10.0 or later.

    protected virtual void ValidateIdentityVersionCompatibility(IModel model)

#### Parameters

`model` IModel

  The model to validate.

### ValidateIndexIncludeProperties(IModel)

This is an internal API that supports the Entity Framework Core infrastructure and not subject to the same compatibility standards as public APIs. It may be changed or removed without notice in any release. You should only use it directly in your code with extreme caution and knowing that doing so can result in application failures when updating to a new Entity Framework Core release.

    protected virtual void ValidateIndexIncludeProperties(IModel model)

#### Parameters

`model` IModel

### ValidateStoredProcedures(IModel, IDiagnosticsLogger<Validation>)

Validates the mapping/configuration of stored procedures in the model.

    protected override void ValidateStoredProcedures(IModel model, IDiagnosticsLogger<DbLoggerCategory.Model.Validation> logger)

#### Parameters

`model` IModel

  The model to validate.

`logger` IDiagnosticsLogger<DbLoggerCategory.Model.Validation>

  The logger to use.

### ValidateValueGeneration(IEntityType, IKey, IDiagnosticsLogger<Validation>)

This is an internal API that supports the Entity Framework Core infrastructure and not subject to the same compatibility standards as public APIs. It may be changed or removed without notice in any release. You should only use it directly in your code with extreme caution and knowing that doing so can result in application failures when updating to a new Entity Framework Core release.

    protected override void ValidateValueGeneration(IEntityType entityType, IKey key, IDiagnosticsLogger<DbLoggerCategory.Model.Validation> logger)

#### Parameters

`entityType` IEntityType
`key` IKey
`logger` IDiagnosticsLogger<DbLoggerCategory.Model.Validation>