Innovt Platform
Search Results for

    Show / Hide Table of Contents

    Class EntityTypeBuilder

    Inheritance
    object
    EntityTypeBuilder
    EntityTypeBuilder<T>
    Inherited Members
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: Innovt.Cloud.AWS.Dynamo.Mapping.Builder
    Assembly: Innovt.Cloud.AWS.Dynamo.dll
    Syntax
    public abstract class EntityTypeBuilder

    Constructors

    | Edit this page View Source

    EntityTypeBuilder()

    Declaration
    protected EntityTypeBuilder()
    | Edit this page View Source

    EntityTypeBuilder(bool)

    Declaration
    protected EntityTypeBuilder(bool ignoreNonNativeTypes)
    Parameters
    Type Name Description
    bool ignoreNonNativeTypes

    Properties

    | Edit this page View Source

    Discriminator

    Declaration
    public DiscriminatorBuilder Discriminator { get; protected set; }
    Property Value
    Type Description
    DiscriminatorBuilder
    | Edit this page View Source

    EntityType

    Declaration
    public string EntityType { get; }
    Property Value
    Type Description
    string
    | Edit this page View Source

    EntityTypeColumnName

    Declaration
    public string EntityTypeColumnName { get; set; }
    Property Value
    Type Description
    string
    | Edit this page View Source

    HashKeyPrefix

    Declaration
    public string HashKeyPrefix { get; }
    Property Value
    Type Description
    string
    | Edit this page View Source

    IgnoreNonNativeTypes

    Tell the auto-map method to ignore all non-native types

    Declaration
    protected bool IgnoreNonNativeTypes { get; }
    Property Value
    Type Description
    bool
    | Edit this page View Source

    KeySeparator

    Define the key prefix separator

    Declaration
    public string KeySeparator { get; }
    Property Value
    Type Description
    string
    | Edit this page View Source

    Pk

    Gets or sets the partition key for the DynamoDB table.

    Declaration
    public string Pk { get; }
    Property Value
    Type Description
    string
    | Edit this page View Source

    PropertyBuilders

    Internal list of properties.

    Declaration
    protected List<PropertyBuilder> PropertyBuilders { get; }
    Property Value
    Type Description
    List<PropertyBuilder>
    | Edit this page View Source

    RangeKeyPrefix

    Gets or sets the range key prefix for the DynamoDB table.

    Declaration
    public string RangeKeyPrefix { get; }
    Property Value
    Type Description
    string
    | Edit this page View Source

    Sk

    Gets or sets the sort key for the DynamoDB table.

    Declaration
    public string Sk { get; }
    Property Value
    Type Description
    string
    | Edit this page View Source

    TableName

    Gets or sets the table name associated with the entity type.

    Declaration
    public string TableName { get; protected set; }
    Property Value
    Type Description
    string

    Methods

    | Edit this page View Source

    AddProperty(string, Type)

    Declaration
    protected abstract PropertyBuilder AddProperty(string name, Type type = null)
    Parameters
    Type Name Description
    string name
    Type type
    Returns
    Type Description
    PropertyBuilder
    | Edit this page View Source

    GetProperties()

    Returns all properties defined for the entity type.

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

    GetProperty(string)

    Gets a property by its column name or Name

    Declaration
    public PropertyBuilder GetProperty(string name)
    Parameters
    Type Name Description
    string name
    Returns
    Type Description
    PropertyBuilder
    | Edit this page View Source

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

    Declaration
    protected static string GetPropertyName<TEntity, TProperty>(Expression<Func<TEntity, TProperty>> propertyExpression)
    Parameters
    Type Name Description
    Expression<Func<TEntity, TProperty>> propertyExpression
    Returns
    Type Description
    string
    Type Parameters
    Name Description
    TEntity
    TProperty
    | Edit this page View Source

    HasDefaultKeys()

    Initializes a new instance of the EntityTypeBuilder<T> class. In this case the default PK and SK will be created

    Declaration
    public EntityTypeBuilder HasDefaultKeys()
    Returns
    Type Description
    EntityTypeBuilder
    | Edit this page View Source

    HasEntityType(string)

    Sets the entity type for the DynamoDB table using a specified entity type.

    Declaration
    public EntityTypeBuilder HasEntityType(string entityTypeName)
    Parameters
    Type Name Description
    string entityTypeName

    The entity type to set.

    Returns
    Type Description
    EntityTypeBuilder

    The current instance of EntityTypeBuilder<T>.

    | Edit this page View Source

    HasEntityTypeColumnName(string)

    The default entity type column name is EntityType. This is used to split the entities in the same table.

    Declaration
    public EntityTypeBuilder HasEntityTypeColumnName(string entityTypeColumnName = "EntityType")
    Parameters
    Type Name Description
    string entityTypeColumnName

    The name of your customized entity type column

    Returns
    Type Description
    EntityTypeBuilder
    | Edit this page View Source

    HasHashKey(string)

    Sets the partition key for the DynamoDB table using a specified partition key.

    Declaration
    public PropertyBuilder HasHashKey(string hashKey = "PK")
    Parameters
    Type Name Description
    string hashKey

    The partition key to set.

    Returns
    Type Description
    PropertyBuilder

    The current instance of EntityTypeBuilder<T>.

    | Edit this page View Source

    HasHashKeyPrefix(string)

    Declaration
    public EntityTypeBuilder HasHashKeyPrefix(string hashKeyPrefix)
    Parameters
    Type Name Description
    string hashKeyPrefix
    Returns
    Type Description
    EntityTypeBuilder
    | Edit this page View Source

    HasRangeKey(string)

    Sets the range key for the DynamoDB table using a specified sort key.

    Declaration
    public PropertyBuilder HasRangeKey(string rangeKey = "SK")
    Parameters
    Type Name Description
    string rangeKey

    The sort key to set.

    Returns
    Type Description
    PropertyBuilder

    The current instance of EntityTypeBuilder<T>.

    | Edit this page View Source

    HasRangeKeyPrefix(string)

    Sets the sort/Range key prefix for the DynamoDB table.

    Declaration
    public EntityTypeBuilder HasRangeKeyPrefix(string rangeKeyPrefix)
    Parameters
    Type Name Description
    string rangeKeyPrefix
    Returns
    Type Description
    EntityTypeBuilder
    | Edit this page View Source

    HasTableName(string, string)

    Sets the table name associated with the entity type.

    Declaration
    public EntityTypeBuilder HasTableName(string tableName, string keySeparator = null)
    Parameters
    Type Name Description
    string tableName

    The table name to set.

    string keySeparator

    If you want to define a key prefix like USER#ID the separator will be #

    Returns
    Type Description
    EntityTypeBuilder

    The current instance of EntityTypeBuilder<T>.

    | Edit this page View Source

    Ignore(string)

    Ignores a property by name during mapping.

    Declaration
    public EntityTypeBuilder Ignore(string name)
    Parameters
    Type Name Description
    string name

    The name of the property to ignore.

    Returns
    Type Description
    EntityTypeBuilder

    The current instance of EntityTypeBuilder<T>.

    | Edit this page View Source

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

    Ignores a property during mapping.

    Declaration
    public EntityTypeBuilder Ignore<TEntity, TProperty>(Expression<Func<TEntity, TProperty>> expression)
    Parameters
    Type Name Description
    Expression<Func<TEntity, TProperty>> expression

    The property to ignore.

    Returns
    Type Description
    EntityTypeBuilder
    Type Parameters
    Name Description
    TEntity
    TProperty
    | Edit this page View Source

    Include(string)

    Include a property that was ignored during a map.

    Declaration
    public EntityTypeBuilder Include(string name)
    Parameters
    Type Name Description
    string name

    The name of the property to include.

    Returns
    Type Description
    EntityTypeBuilder

    The current instance of EntityTypeBuilder<T>.

    | Edit this page View Source

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

    Include a property that was ignored during a map.

    Declaration
    public EntityTypeBuilder Include<TEntity, TProperty>(Expression<Func<TEntity, TProperty>> expression)
    Parameters
    Type Name Description
    Expression<Func<TEntity, TProperty>> expression

    The property to include.

    Returns
    Type Description
    EntityTypeBuilder
    Type Parameters
    Name Description
    TEntity
    TProperty
    | Edit this page View Source

    Property(string)

    Defines a property for the entity using a specified property name.

    Declaration
    public PropertyBuilder Property(string name)
    Parameters
    Type Name Description
    string name

    The name of the property.

    Returns
    Type Description
    PropertyBuilder

    The property type builder for further property configuration.

    | Edit this page View Source

    ShouldIgnoreNonNativeTypes(bool?)

    Check if complex types should be ignored. The default is true and can be changed by the user for each entity.

    Declaration
    protected bool ShouldIgnoreNonNativeTypes(bool? ignoreNonNativeTypes)
    Parameters
    Type Name Description
    bool? ignoreNonNativeTypes
    Returns
    Type Description
    bool

    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