Skip to content

Commit de0c4a1

Browse files
committed
Fixing docs; fixes #4553
1 parent 491a1ca commit de0c4a1

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

docs/source/Before-and-after-map-actions.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ public class Startup
8080
{
8181
public void ConfigureServices(IServiceCollection services)
8282
{
83-
services.AddAutoMapper(typeof(Startup).Assembly);
83+
services.AddAutoMapper(_ => { }, typeof(Startup).Assembly);
8484
}
8585
//..
8686
}

docs/source/Dependency-injection.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,11 @@ Starting with version 13.0, `AddAutoMapper` is part of the core package and the
1010

1111
You define the configuration using [profiles](Configuration.html#profile-instances). And then you let AutoMapper know in what assemblies are those profiles defined by calling the `IServiceCollection` extension method `AddAutoMapper` at startup:
1212
```c#
13-
services.AddAutoMapper(profileAssembly1, profileAssembly2 /*, ...*/);
13+
services.AddAutoMapper(cfg => { }, profileAssembly1, profileAssembly2 /*, ...*/);
1414
```
1515
or marker types:
1616
```c#
17-
services.AddAutoMapper(typeof(ProfileTypeFromAssembly1), typeof(ProfileTypeFromAssembly2) /*, ...*/);
17+
services.AddAutoMapper(cfg => { }, typeof(ProfileTypeFromAssembly1), typeof(ProfileTypeFromAssembly2) /*, ...*/);
1818
```
1919
Now you can inject AutoMapper at runtime into your services/controllers:
2020
```c#

0 commit comments

Comments
 (0)