Innovt Platform
Search Results for

    Show / Hide Table of Contents

    Class PropertyBuilder<T>

    Represents a builder for defining the properties of an entity type.

    Inheritance
    object
    PropertyBuilder
    PropertyBuilder<T>
    Inherited Members
    PropertyBuilder.Required
    PropertyBuilder.HasMapAction
    PropertyBuilder.Name
    PropertyBuilder.Type
    PropertyBuilder.ColumnName
    PropertyBuilder.Ignored
    PropertyBuilder.MaxLength
    PropertyBuilder.GetDefaultValue<T>(T)
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: Innovt.Cloud.AWS.Dynamo.Mapping.Builder
    Assembly: Innovt.Cloud.AWS.Dynamo.dll
    Syntax
    public sealed class PropertyBuilder<T> : PropertyBuilder
    Type Parameters
    Name Description
    T

    The type of the entity.

    Constructors

    | Edit this page View Source

    PropertyBuilder(Func<T, string>, EntityTypeBuilder<T>)

    Initializes a new instance of the PropertyBuilder<T> class with a specified property name.

    Declaration
    public PropertyBuilder(Func<T, string> propertyName, EntityTypeBuilder<T> builder)
    Parameters
    Type Name Description
    Func<T, string> propertyName

    The function to retrieve the property name.

    EntityTypeBuilder<T> builder

    This is the main build to help the user with fluent api

    | Edit this page View Source

    PropertyBuilder(Func<T, string>, Type, EntityTypeBuilder<T>)

    Initializes a new instance of the PropertyBuilder<T> class with a specified property name and type.

    Declaration
    public PropertyBuilder(Func<T, string> propertyName, Type propertyType, EntityTypeBuilder<T> builder)
    Parameters
    Type Name Description
    Func<T, string> propertyName

    The function to retrieve the property name.

    Type propertyType

    The type of the property.

    EntityTypeBuilder<T> builder

    This is the main build to help the user with fluent api

    Properties

    | Edit this page View Source

    Builder

    Declaration
    public EntityTypeBuilder<T> Builder { get; set; }
    Property Value
    Type Description
    EntityTypeBuilder<T>

    Methods

    | Edit this page View Source

    HasColumnName(string)

    Specifies a custom column name for the property in the database.

    Declaration
    public PropertyBuilder<T> HasColumnName(string name)
    Parameters
    Type Name Description
    string name

    The custom column name.

    Returns
    Type Description
    PropertyBuilder<T>

    The current instance of PropertyBuilder<T>.

    | Edit this page View Source

    HasDefaultValue(object)

    It set a value for property.

    Declaration
    public PropertyBuilder<T> HasDefaultValue(object value)
    Parameters
    Type Name Description
    object value
    Returns
    Type Description
    PropertyBuilder<T>
    | Edit this page View Source

    HasMaxLength(int)

    Specifies that the property is of decimal type.

    Declaration
    public PropertyBuilder<T> HasMaxLength(int maxLength)
    Parameters
    Type Name Description
    int maxLength
    Returns
    Type Description
    PropertyBuilder<T>

    The current instance of PropertyBuilder<T>.

    | Edit this page View Source

    Ignore()

    The property will be ignored by the mapping.

    Declaration
    public PropertyBuilder<T> Ignore()
    Returns
    Type Description
    PropertyBuilder<T>
    | Edit this page View Source

    Include()

    The property will be included by the mapping.

    Declaration
    public PropertyBuilder<T> Include()
    Returns
    Type Description
    PropertyBuilder<T>
    | Edit this page View Source

    InvokeMaps<TEntity>(TEntity)

    Invoke all map actions

    Declaration
    public PropertyBuilder<T> InvokeMaps<TEntity>(TEntity entity) where TEntity : T
    Parameters
    Type Name Description
    TEntity entity
    Returns
    Type Description
    PropertyBuilder<T>
    Type Parameters
    Name Description
    TEntity
    | Edit this page View Source

    IsRequired(bool)

    Define when a fi

    Declaration
    public PropertyBuilder<T> IsRequired(bool isRequired = true)
    Parameters
    Type Name Description
    bool isRequired

    Default value if true.

    Returns
    Type Description
    PropertyBuilder<T>
    | Edit this page View Source

    SetDynamicValue(Func<T, object>)

    Define a delegate to set the value of the property based on the entity.

    Declaration
    public PropertyBuilder<T> SetDynamicValue(Func<T, object> valueDelegate)
    Parameters
    Type Name Description
    Func<T, object> valueDelegate
    Returns
    Type Description
    PropertyBuilder<T>
    Exceptions
    Type Condition
    ArgumentNullException
    | Edit this page View Source

    WithMap(Action<T>)

    Define a delegate to parse the property.

    Declaration
    public PropertyBuilder<T> WithMap(Action<T> actionMap)
    Parameters
    Type Name Description
    Action<T> actionMap

    The action to parse the property.

    Returns
    Type Description
    PropertyBuilder<T>

    The current instance of PropertyBuilder<T>.

    Extension Methods

    Extensions.IsNull(object)
    Extensions.ToStringOrDefault(object)
    SimpleMapper.MapTo<T1>(object)
    • Edit this page
    • View Source
    In this article
    Back to top Generated by DocFX