Skip to content
This repository was archived by the owner on May 25, 2023. It is now read-only.

Commit 4daa3e7

Browse files
authored
Updates for lifetime changes
1 parent ed6fa88 commit 4daa3e7

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ services.AddAutoMapper(type1, type2 /*, ...*/);
2020
This registers AutoMapper:
2121

2222
- As a singleton for the `MapperConfiguration`
23-
- As a scoped instance for `IMapper`
23+
- As a transient instance for `IMapper`
2424
- `ITypeConverter` instances as transient
2525
- `IValueConverter` instances as transient
2626
- `IValueResolver` instances as transient
@@ -29,7 +29,7 @@ This registers AutoMapper:
2929

3030
Mapping configuration is static as it is the root object that can create an `IMapper`.
3131

32-
Mapper instances are registered as scoped as they are intented to be used within the lifetime of a request. Since a `Mapper` instance can internally create other instances during mapping, it cannot be registered statically.
32+
Mapper instances are registered as transient as they are intented to be used within the lifetime of a request. You can configure this with the `serviceLifetime` parameter. Be careful changing this as `Mapper` takes a dependency on a factory method to instantiate the other extensions.
3333

3434
### Mapper.Map usage
3535

0 commit comments

Comments
 (0)