# Mappers

A Mapper is a class that takes a control model and maps it into a DTO and vice versa. In other words, it creates a DTO based in the information contained in a model or component. When something needs to be sent to the client or need to synchronize data sent by client with back-end controls, the mapper process is invoked.

A mapper is composed by the following method:

* Map: it takes a control model as input and creates a new DTO based on the information contained in each model, this process is triggered at the end of each WebMap Request and is used to send information from the server to the client.
* ApplyChanges: it takes a DTO and syncs its value into a control model, this process is one of the first things that occur in WebMap request, and it get triggered when there is data coming from the client to the server.
* Configure: sets the references need by an object in order to be rendered correctly, for example, a button control may have a Parent property that references to its container control (a window, a panel, a tab control, etc.), which also has a DTO for it, the referenced mechanism associates both DTOs. It could be triggered by both client and server synchronization.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.gapvelocity.ai/webmap/general/backend/dcp-desktop-compatibly-platform/library-bundles/bundle-dto/mappers.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
