Show / Hide Table of Contents

    Interface IPrimaryKeyBuilder<TEntity>

    Builder for fluent configuration of entity, which allows configuration of primary key.

    Inherited Members
    IEntityTypePropertyBuilder<TEntity>.Property<TProperty>(Expression<Func<TEntity, TProperty>>)
    Namespace: Kros.KORM.Metadata
    Assembly: Kros.KORM.dll
    Syntax
    public interface IPrimaryKeyBuilder<TEntity> : IEntityTypePropertyBuilder<TEntity> where TEntity : class
    Type Parameters
    Name Description
    TEntity

    Type of entity. In general it is a class representing table in database.

    Methods

    AutoIncrement(AutoIncrementMethodType)

    Configures auto-increment type of primary key. If

    Declaration
    IEntityTypeConvertersBuilder<TEntity> AutoIncrement(AutoIncrementMethodType autoIncrementType = AutoIncrementMethodType.Identity)
    Parameters
    Type Name Description
    AutoIncrementMethodType autoIncrementType

    Auto-increment type of the primary key. If called without specifying the value, AutoIncrementMethodType will be used.

    Returns
    Type Description
    IEntityTypeConvertersBuilder<TEntity>

    Returns builder for additional configuration of the entity.

    Back to top KROS a.s.