Skip to content

An object-to-object mapper. Separated into four mapping categories: adapters, mappers, selectors, and specifiers.

License

Notifications You must be signed in to change notification settings

Royal-Code/SmartMapper

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SmartMapper

An object-to-object mapper. Separated into thre mapping categories: commands, selectors, and specifiers.

Commands creates a handler that calls a method of the current object, reading entities, passing parameters, and returning the result.

Selectors read values from source object properties to assign to a target object's properties, where a new instance of the target object is always created.
The selectors may look like adapters, but there are big differences.
First is that selectors start from the properties of the target object to know which property of the source object to read from. This is the reverse of what happens with adapters and mappers.
Second, selectors can only assign properties, you cannot map them to constructors or methods.

Specifiers are different from the previous ones. Instead of assigning values, they apply conditions on queries.
The source of the selectors are filter objects, and the target is queryable models, such as entities.
Instead of assigning values between properties, specifiers apply the Where condition of an IQueryable, comparing the values of the filter (source) and the entity (target).

Stats

Alt

About

An object-to-object mapper. Separated into four mapping categories: adapters, mappers, selectors, and specifiers.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published