# Class NpgsqlValueGeneratorCache

Namespace
  Npgsql.EntityFrameworkCore.PostgreSQL.ValueGeneration.Internal

Assembly
  Npgsql.EntityFrameworkCore.PostgreSQL.dll

This API supports the Entity Framework Core infrastructure and is not intended to be used directly from your code. This API may change or be removed in future releases.

    public class NpgsqlValueGeneratorCache : ValueGeneratorCache, INpgsqlValueGeneratorCache, IValueGeneratorCache

Inheritance
  object
  ValueGeneratorCache
  NpgsqlValueGeneratorCache

Implements
  INpgsqlValueGeneratorCache
  IValueGeneratorCache

Inherited Members
  ValueGeneratorCache.GetOrAdd(IProperty, ITypeBase, Func<IProperty, ITypeBase, ValueGenerator>)
  ValueGeneratorCache.Dependencies
  object.Equals(object)
  object.Equals(object, object)
  object.GetHashCode()
  object.GetType()
  object.MemberwiseClone()
  object.ReferenceEquals(object, object)
  object.ToString()

## Constructors

### NpgsqlValueGeneratorCache(ValueGeneratorCacheDependencies)

Initializes a new instance of the ValueGeneratorCache class.

    public NpgsqlValueGeneratorCache(ValueGeneratorCacheDependencies dependencies)

#### Parameters

`dependencies` ValueGeneratorCacheDependencies

  Parameter object containing dependencies for this service.

## Methods

### GetOrAddSequenceState(IProperty, IRelationalConnection)

This API supports the Entity Framework Core infrastructure and is not intended to be used directly from your code. This API may change or be removed in future releases.

    public virtual NpgsqlSequenceValueGeneratorState GetOrAddSequenceState(IProperty property, IRelationalConnection connection)

#### Parameters

`property` IProperty
`connection` IRelationalConnection

#### Returns

NpgsqlSequenceValueGeneratorState