Skip to content

Commit d3f06c8

Browse files
PanyushkinDPanyushkinD
authored andcommitted
2 parents 346e431 + 9d9f211 commit d3f06c8

1 file changed

Lines changed: 6 additions & 3 deletions

File tree

README.md

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -71,10 +71,13 @@ class Program
7171
}
7272
```
7373

74-
## Mapping collections other than `List<T>`
74+
### Mapping collections other than `List<T>`
7575
```cs
76-
cfg.CreateMap<IEnumerable<Model>, ICollection<Entity>>()
77-
.UsingCollectionConverter((Model m) => m.Id, (Entity e) => e.Id);
76+
var config = new MapperConfiguration(cfg =>
77+
{
78+
cfg.CreateMap<IEnumerable<Model>, ICollection<Entity>>()
79+
.UsingCollectionConverter((Model m) => m.Id, (Entity e) => e.Id);
80+
});
7881
```
7982

8083
## Using with [Mapster](https://github.com/eswann/Mapster)

0 commit comments

Comments
 (0)