DbConnectionPlus API Documentation
Search Results for

    Show / Hide Table of Contents

    Class EntityTypeBuilder<TEntity>

    A builder for configuring an entity type.

    Inheritance
    object
    EntityTypeBuilder<TEntity>
    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 EntityTypeBuilder<TEntity> : IFreezable
    Type Parameters
    Name Description
    TEntity

    The type of the entity being configured.

    Constructors

    View Source

    EntityTypeBuilder()

    Declaration
    public EntityTypeBuilder()

    Methods

    View Source

    Property<TProperty>(Expression<Func<TEntity, TProperty>>)

    Gets a builder for configuring the specified property.

    Declaration
    public EntityPropertyBuilder Property<TProperty>(Expression<Func<TEntity, TProperty>> propertyExpression)
    Parameters
    Type Name Description
    Expression<Func<TEntity, TProperty>> propertyExpression

    A lambda expression representing the property to be configured (blog => blog.Url).

    Returns
    Type Description
    EntityPropertyBuilder

    The builder for the specified property.

    Type Parameters
    Name Description
    TProperty

    The property type of the property to configure.

    Exceptions
    Type Condition
    ArgumentException

    propertyExpression is not a valid property access expression.

    ArgumentNullException

    propertyExpression is null.

    InvalidOperationException

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

    View Source

    ToTable(string)

    Maps the entity to the specified table name.

    Declaration
    public EntityTypeBuilder<TEntity> ToTable(string tableName)
    Parameters
    Type Name Description
    string tableName

    The name of the table to map the entity to.

    Returns
    Type Description
    EntityTypeBuilder<TEntity>

    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