# MappingConfig

- File ID: file:w6cklc:mappingconfig-cs
- Path: NexusReader.Application/Mappings/MappingConfig.cs
- Role: service-registration
- Layer: application

## Purpose

Defines an IServiceCollection extension to configure Mapster mappings and register mapping services (TypeAdapterConfig and IMapper) into the application's DI container.

## Key Details

Extension method intended to be called during application startup to wire Mapster mappings and mapper into IServiceCollection; no branching, retries, or persistence logic present.

## Symbols

- MappingConfig: Defines an IServiceCollection extension to configure Mapster mappings and register mapping services (TypeAdapterConfig and IMapper) into the application's DI container.
- AddMapsterConfiguration(): Creates Mapster TypeAdapterConfig mappings and registers the config and IMapper in the DI container, returning the IServiceCollection for chaining.

## Dependencies

- No resolved dependencies.

## Calls

- No resolved calls.

## Unresolved References

- dependency-target: NexusReader.Domain/Entities (NexusUser, Ebook referenced)
- dependency-target: NexusReader.Application/DTOs/User (UserProfileDto, LastReadBookDto referenced)
- interaction-target: var config = TypeAdapterConfig.GlobalSettings (Mapster library global settings accessed)

## Coverage

- Symbols: 2
- Executable symbols: 1
- Executable symbols with control flow: 1
- Grounded edges: 2
- Unresolved references: 3
- Control-flow fragments: 1
- Unresolved jumps: 0
- Unsupported constructs: 0
- Control-flow coverage: 100%
- Required diagrams: 2
- Generated diagrams: 2

## Control Flow Fragments

- AddMapsterConfiguration: 9 nodes, 8 edges, 0 jumps, 0 unsupported constructs

## Diagrams

### MappingConfig Neighborhood

```mermaid
flowchart LR
    class_1lmiwem_mappingconfig("MappingConfig")
    file_w6cklc_mappingconfig_cs("MappingConfig")
    method_14hjndb_addmapsterconfiguration[["AddMapsterConfiguration()"]]
```

### MappingConfig Execution Overview

```mermaid
flowchart TD
    class_1lmiwem_mappingconfig("MappingConfig")
    method_14hjndb_addmapsterconfiguration[["AddMapsterConfiguration()"]]
    unresolved_unresolved_132t2nb_interaction_target{"Unresolved: var config = TypeAdapterConfig.GlobalSettings (Mapster library global settings accessed)"}
    class_1lmiwem_mappingconfig -->|contains| method_14hjndb_addmapsterconfiguration
    class_1lmiwem_mappingconfig -->|unresolved interaction| unresolved_unresolved_132t2nb_interaction_target
```

## Diagram Validation

- Status: pass
