Innovt Platform
Search Results for

    Show / Hide Table of Contents

    Class BaseDataModel<TDataModel, TDomain>

    Base abstract class representing a data model that can be mapped to/from a domain model.

    Inheritance
    object
    BaseDataModel<TDataModel, TDomain>
    Implements
    ITableMessage
    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
    Assembly: Innovt.Cloud.AWS.Dynamo.dll
    Syntax
    public abstract class BaseDataModel<TDataModel, TDomain> : ITableMessage where TDataModel : class where TDomain : class
    Type Parameters
    Name Description
    TDataModel

    The type of the data model.

    TDomain

    The type of the domain model.

    Properties

    | Edit this page View Source

    EntityType

    Gets or sets the entity type.

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

    Id

    Gets or sets the unique identifier.

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

    Pk

    Gets or sets the partition key for DynamoDB.

    Declaration
    [DynamoDBHashKey("PK")]
    public string Pk { get; set; }
    Property Value
    Type Description
    string
    | Edit this page View Source

    Sk

    Gets or sets the sort key for DynamoDB.

    Declaration
    [DynamoDBRangeKey("SK")]
    public string Sk { get; set; }
    Property Value
    Type Description
    string

    Methods

    | Edit this page View Source

    CustomDataModelMap(TDataModel, TDomain)

    Custom mapping logic from domain model to data model.

    Declaration
    protected abstract void CustomDataModelMap(TDataModel dataModel, TDomain domain)
    Parameters
    Type Name Description
    TDataModel dataModel

    The data model.

    TDomain domain

    The domain model.

    | Edit this page View Source

    CustomDomainMap(TDomain, TDataModel)

    Custom mapping logic from data model to domain model.

    Declaration
    protected abstract void CustomDomainMap(TDomain tDomain, TDataModel dataModel)
    Parameters
    Type Name Description
    TDomain tDomain

    The domain model.

    TDataModel dataModel

    The data model.

    | Edit this page View Source

    GetEntityType()

    Protected abstract method to get the entity type.

    Declaration
    protected abstract string GetEntityType()
    Returns
    Type Description
    string

    The entity type.

    | Edit this page View Source

    ToDataModel(IList<TDomain>)

    Converts a list of domain models to a list of data models.

    Declaration
    public IList<TDataModel> ToDataModel(IList<TDomain> domains)
    Parameters
    Type Name Description
    IList<TDomain> domains

    The list of domain models to convert.

    Returns
    Type Description
    IList<TDataModel>

    The converted list of data models.

    | Edit this page View Source

    ToDataModel(TDomain)

    Converts a domain model to a data model.

    Declaration
    public virtual TDataModel ToDataModel(TDomain domain)
    Parameters
    Type Name Description
    TDomain domain

    The domain model to convert.

    Returns
    Type Description
    TDataModel

    The converted data model.

    | Edit this page View Source

    ToDomain(IList<TDataModel>)

    Converts a list of data models to a list of domain models.

    Declaration
    public IList<TDomain> ToDomain(IList<TDataModel> dataModels)
    Parameters
    Type Name Description
    IList<TDataModel> dataModels

    The list of data models to convert.

    Returns
    Type Description
    IList<TDomain>

    The converted list of domain models.

    | Edit this page View Source

    ToDomain(TDataModel)

    Converts a data model to a domain model.

    Declaration
    public virtual TDomain ToDomain(TDataModel dataModel)
    Parameters
    Type Name Description
    TDataModel dataModel

    The data model to convert.

    Returns
    Type Description
    TDomain

    The converted domain model.

    Implements

    ITableMessage

    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