> For the complete documentation index, see [llms.txt](https://dynamic-mapper.gitbook.io/dynamic-mapper/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://dynamic-mapper.gitbook.io/dynamic-mapper/configuration/member-configuration.md).

# Member configuration

### mapFrom

Sets function that takes in source object and returns destination value.

```typescript
createMap(SrcToDst, {
    bar: opt => opt.mapFrom(src => src.foo)
});
```

### mapFromUsing

Similarly to `mapFrom` takes in mapping function and `MappingPair` which configuration will be used to map corresponding member.

```typescript
createMap(SrcToDst, {
    bar: opt => opt.mapFromUsing(src => src.foo, FooToBar)
});
```

### addTransform

Transforms value before mapping to destination.

```typescript
createMap(SrcToDst, {
    bar: opt => {
        opt.mapFrom(src => src.foo);
        opt.addTransform(dest => dest + ', it was mapped!');
    }
});
```

### condition

Called before destination value will be assigned.

```typescript
createMap(SrcToDst, {
    bar: opt => {
        opt.condition(src => src.foo != null);
        opt.mapFrom(src => src.foo);
    }
});
```

### preCondition

Called before resolving destination value and stops mapping on false.

```typescript
createMap(SrcToDst, {
    bar: opt => {
        opt.preCondition(src => src.foo != null);
        opt.mapFrom(src => {
            // expensive resolution avoided with preCondition
        });
    }
});
```

### nullSubstitute

When source member value resolves to null or undefined alternate value will be used.

```typescript
createMap(SrcToDst, {
    bar: opt => {
        opt.nullSubstitute(123);
        opt.mapFrom(src => src.foo);
    }
});
```

### ignore

Skips this member during mapping.

```typescript
createMap(SrcToDst, {
    bar: opt => opt.ignore()
});
```

### auto

Explicitly marks member for auto mapping. Can be called only on members present on both source and destination.

```typescript
createMap(SrcToDst, {
    bar: opt => opt.auto()
});
```
