DbConnectionPlus API Documentation
Search Results for

    Show / Hide Table of Contents

    Class EntityPropertyBuilder

    A builder for configuring an entity property.

    Inheritance
    object
    EntityPropertyBuilder
    Implements
    IFreezable
    Inherited Members
    object.GetType()
    object.ToString()
    object.Equals(object)
    object.Equals(object, object)
    object.ReferenceEquals(object, object)
    object.GetHashCode()
    Namespace: RentADeveloper.DbConnectionPlus.Configuration
    Assembly: RentADeveloper.DbConnectionPlus.dll
    Syntax
    public sealed class EntityPropertyBuilder : IFreezable

    Methods

    View Source

    HasColumnName(string)

    Sets the name of the column to map the property to.

    Declaration
    public EntityPropertyBuilder HasColumnName(string columnName)
    Parameters
    Type Name Description
    string columnName

    The name of the column to map the property to.

    Returns
    Type Description
    EntityPropertyBuilder

    This builder instance for further configuration.

    Exceptions
    Type Condition
    InvalidOperationException

    The configuration of DbConnectionPlus is already frozen and can no longer be modified.

    View Source

    IsComputed()

    Marks the property as mapped to a computed database column. Such properties will be ignored during insert and update operations. Their values will be read back from the database after an insert or update and populated on the entity.

    Declaration
    public EntityPropertyBuilder IsComputed()
    Returns
    Type Description
    EntityPropertyBuilder

    This builder instance for further configuration.

    Exceptions
    Type Condition
    InvalidOperationException

    The configuration of DbConnectionPlus is already frozen and can no longer be modified.

    View Source

    IsConcurrencyToken()

    Marks the property as participating in optimistic concurrency checks. Such properties will be checked during delete and update operations. When their values in the database do not match the original values, the delete or update will fail.

    Declaration
    public EntityPropertyBuilder IsConcurrencyToken()
    Returns
    Type Description
    EntityPropertyBuilder

    This builder instance for further configuration.

    Exceptions
    Type Condition
    InvalidOperationException

    The configuration of DbConnectionPlus is already frozen and can no longer be modified.

    View Source

    IsIdentity()

    Marks the property as mapped to an identity database column. Such properties will be ignored during insert and update operations. Their values will be read back from the database after an insert or update and populated on the entity.

    Declaration
    public EntityPropertyBuilder IsIdentity()
    Returns
    Type Description
    EntityPropertyBuilder

    This builder instance for further configuration.

    Exceptions
    Type Condition
    InvalidOperationException

    Another property is already marked as an identity property for the entity type.

    InvalidOperationException

    The configuration of DbConnectionPlus is already frozen and can no longer be modified.

    View Source

    IsIgnored()

    Marks the property to not be mapped to a database column.

    Declaration
    public EntityPropertyBuilder IsIgnored()
    Returns
    Type Description
    EntityPropertyBuilder

    This builder instance for further configuration.

    Exceptions
    Type Condition
    InvalidOperationException

    The configuration of DbConnectionPlus is already frozen and can no longer be modified.

    View Source

    IsKey()

    Marks the property as a key property.

    Declaration
    public EntityPropertyBuilder IsKey()
    Returns
    Type Description
    EntityPropertyBuilder

    This builder instance for further configuration.

    Exceptions
    Type Condition
    InvalidOperationException

    The configuration of DbConnectionPlus is already frozen and can no longer be modified.

    View Source

    IsRowVersion()

    Marks the property as mapped to a row version database column. Such properties will be checked during delete and update operations. When their values in the database do not match the original values, the delete or update will fail. After an insert or update, their values will be read back from the database and populated on the entity.

    Declaration
    public EntityPropertyBuilder IsRowVersion()
    Returns
    Type Description
    EntityPropertyBuilder

    This builder instance for further configuration.

    Exceptions
    Type Condition
    InvalidOperationException

    The configuration of DbConnectionPlus is already frozen and can no longer be modified.

    Implements

    IFreezable
    • View Source
    In this article
    Back to top Generated by DocFX