Skip to content

Mapper Types

Leonardo Porro edited this page Jan 27, 2023 · 4 revisions

A schema is a regular .NET type or set of types, with an associated mapping behavior and/or mapper factory.

Schemas handled by the mapper

Simple, plain values, with no members or indexers, such as int, string, bool, etc. Or, any other type whose members or items shouldn't be recursively mapped, for example DbGeography.

Schema with a set of members (i.e.: properties) that should be inspected and recursively mapped.

Schema with items, that should be iterated and recursively mapped.

It's a complex schema with a special entity flag and one or more members defined as key. The mapper handles entity schemas diferently than complex, doing comparisons by key and merging, to keep the graph in sync with the ORMs.

Complex schema, similar to an entity, but used as the source (input) of a Map operation while the entity is the target. It doesn't need to have key members defined, but the key members of the target entity should exist and have a value in source DTO.