# Virtual Provider Mapping

You can also use our cool mapping DSL to create mappings that refer to provided objects by using the DSL construction type:

```javascript
// map an object to a virtual provided object
map("coolObjectProvider")
    .toDSL("provider:HardToConstructObject");

// map an object an set the explicit DI arguments or DI setters to virtual provided objects
map("SearchService")
    .to("model.search.SearchService")
    .initArg(name="searchCriteria",dsl="provider:requestCriteria");
```

You can use the following mapping methods to map to virtual providers by using their dsl arguments:

* `mapDSL()`
* `mapDSL()`
* `property(name="",dsl="")`
* `setter(name="",dsl="")`
* `methodArg(name="",dsl="")`


---

# 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://wirebox.ortusbooks.com/advanced-topics/providers/virtual-provider-mapping.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.
