Skip to content

Commit

Permalink
Change Auto Mapper method name to prevent name resolution conflicting
Browse files Browse the repository at this point in the history
  • Loading branch information
MostafaFarajbakhsh authored Jul 13, 2024
1 parent 2554159 commit 6425e08
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ namespace BSN.Commons.AutoMapper.Extensions
{
public static class IServiceCollectionExtensions
{
public static IServiceCollection AddAutoMapper(this IServiceCollection services, Action<IMapperConfigurationExpression> configure)
public static IServiceCollection AddCommonsAutoMapper(this IServiceCollection services, Action<IMapperConfigurationExpression> configure)
{
var mappingConfig = new MapperConfiguration(config =>
{
Expand Down
4 changes: 2 additions & 2 deletions Source/BSN.Commons.AutoMapper/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,11 @@ Install-Package BSN.Commons.AutoMapper
### 2. Add Your required mapping profiles
To use these predefined mapping profiles and injecting your preferred profiles you just need to add following line in the `ServiceCollection`:
```
services.AddAutoMapper(config => config.AddProfile<YourMappingProfile>());
services.AddCommonsAutoMapper(config => config.AddProfile<YourMappingProfile>());
```
or
```
services.AddAutoMapper(config =>
services.AddCommonsAutoMapper(config =>
{
config.AddProfile<YourFirstMappingProfile>();
config.AddProfile<YourSecondMappingProfile>();
Expand Down

0 comments on commit 6425e08

Please sign in to comment.