Innovt Platform
Search Results for

    Show / Hide Table of Contents

    Class EntityTypeBuilder<T>

    A builder for defining the entity type and its properties for use with DynamoDB.

    Inheritance
    object
    EntityTypeBuilder
    EntityTypeBuilder<T>
    Inherited Members
    EntityTypeBuilder.TableName
    EntityTypeBuilder.Pk
    EntityTypeBuilder.HashKeyPrefix
    EntityTypeBuilder.KeySeparator
    EntityTypeBuilder.Sk
    EntityTypeBuilder.RangeKeyPrefix
    EntityTypeBuilder.EntityTypeColumnName
    EntityTypeBuilder.Discriminator
    EntityTypeBuilder.Ignore<TEntity, TProperty>(Expression<Func<TEntity, TProperty>>)
    EntityTypeBuilder.Include<TEntity, TProperty>(Expression<Func<TEntity, TProperty>>)
    EntityTypeBuilder.GetProperties()
    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 EntityTypeBuilder<T> : EntityTypeBuilder
    Type Parameters
    Name Description
    T

    The type of the entity being defined.

    Constructors

    | Edit this page View Source

    EntityTypeBuilder()

    Declaration
    public EntityTypeBuilder()
    | Edit this page View Source

    EntityTypeBuilder(bool)

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

    Properties

    | Edit this page View Source

    EntityType

    When typed the default value of the entity type will be the name of the entity

    Declaration
    public string EntityType { get; }
    Property Value
    Type Description
    string

    Methods

    | Edit this page View Source

    AddProperty(string, Type)

    Declaration
    protected override PropertyBuilder<T> AddProperty(string name, Type type = null)
    Parameters
    Type Name Description
    string name
    Type type
    Returns
    Type Description
    PropertyBuilder<T>
    Overrides
    EntityTypeBuilder.AddProperty(string, Type)
    | Edit this page View Source

    AutoMap(bool, bool?)

    Starts a reflection process to auto map all properties of the entity type.

    Declaration
    public EntityTypeBuilder<T> AutoMap(bool withDefaultKeys = true, bool? ignoreNonNativeTypes = null)
    Parameters
    Type Name Description
    bool withDefaultKeys

    Default keys are PK and SK

    bool? ignoreNonNativeTypes

    Ignore all complex types

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

    GetProperty(string)

    Declaration
    public PropertyBuilder<T> GetProperty(string name)
    Parameters
    Type Name Description
    string name
    Returns
    Type Description
    PropertyBuilder<T>
    | 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<T> HasDefaultKeys()
    Returns
    Type Description
    EntityTypeBuilder<T>
    | Edit this page View Source

    HasDiscriminator(string)

    Define a discriminator for the entity. Entities with discriminator mean that more than one type can be inherited from the same type.

    Declaration
    public DiscriminatorBuilder HasDiscriminator(string name)
    Parameters
    Type Name Description
    string name

    The name of the column that will be used to check the value.

    Returns
    Type Description
    DiscriminatorBuilder
    | Edit this page View Source

    HasEntityType(string)

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

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

    The entity type to set.

    Returns
    Type Description
    EntityTypeBuilder<T>

    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<T> HasEntityTypeColumnName(string entityTypeColumnName = "EntityType")
    Parameters
    Type Name Description
    string entityTypeColumnName

    The name of your customized entity type column

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

    HasHashKey(string)

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

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

    The partition key to set.

    Returns
    Type Description
    PropertyBuilder<T>

    The current instance of EntityTypeBuilder<T>.

    | Edit this page View Source

    HasHashKeyPrefix(string)

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

    HasHashKey<TProperty>(Expression<Func<T, TProperty>>)

    Sets the partition key for the DynamoDB table using a provided hash key function.

    Declaration
    public PropertyBuilder<T> HasHashKey<TProperty>(Expression<Func<T, TProperty>> expression)
    Parameters
    Type Name Description
    Expression<Func<T, TProperty>> expression

    The hash key function to generate the partition key.

    Returns
    Type Description
    PropertyBuilder<T>

    The current instance of EntityTypeBuilder<T>.

    Type Parameters
    Name Description
    TProperty
    | Edit this page View Source

    HasRangeKey(string)

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

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

    The sort key to set.

    Returns
    Type Description
    PropertyBuilder<T>

    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<T> HasRangeKeyPrefix(string rangeKeyPrefix)
    Parameters
    Type Name Description
    string rangeKeyPrefix
    Returns
    Type Description
    EntityTypeBuilder<T>
    | Edit this page View Source

    HasRangeKey<TProperty>(Expression<Func<T, TProperty>>)

    Sets the sort key for the DynamoDB table using a provided sort key function.

    Declaration
    public PropertyBuilder<T> HasRangeKey<TProperty>(Expression<Func<T, TProperty>> expression)
    Parameters
    Type Name Description
    Expression<Func<T, TProperty>> expression

    The sort key function to generate the sort key.

    Returns
    Type Description
    PropertyBuilder<T>

    The current instance of EntityTypeBuilder<T>.

    Type Parameters
    Name Description
    TProperty
    | Edit this page View Source

    HasTableName(string, string)

    Sets the table name associated with the entity type.

    Declaration
    public EntityTypeBuilder<T> 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<T>

    The current instance of EntityTypeBuilder<T>.

    | Edit this page View Source

    Ignore(string)

    Ignores a property by name during mapping.

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

    The name of the property to ignore.

    Returns
    Type Description
    EntityTypeBuilder<T>

    The current instance of EntityTypeBuilder<T>.

    | Edit this page View Source

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

    Ignores a property during mapping.

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

    The property to ignore.

    Returns
    Type Description
    EntityTypeBuilder<T>
    Type Parameters
    Name Description
    TProperty
    | Edit this page View Source

    Include(string)

    Include a property that was ignored during a map.

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

    The name of the property that you want to include.

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

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

    Include a property that was ignored during a map.

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

    The property to include.

    Returns
    Type Description
    EntityTypeBuilder<T>
    Type Parameters
    Name Description
    TProperty
    | Edit this page View Source

    Property(string)

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

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

    The name of the property.

    Returns
    Type Description
    PropertyBuilder<T>

    The property type builder for further property configuration.

    | Edit this page View Source

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

    Defines a property for the entity using a provided property function.

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

    The property function to generate the property.

    Returns
    Type Description
    PropertyBuilder<T>

    The property type builder for further property configuration.

    Type Parameters
    Name Description
    TProperty

    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