Browse Source
Disable `MapperlyAutoObjectMappingProvider` if AutoMapper used in app.
This is the temporary solution, We will remove it in when all apps are migrated to Mapperly.
pull/23469/head
maliming
6 months ago
No known key found for this signature in database
GPG Key ID: A646B9CB645ECEA4
1 changed files with
8 additions and
2 deletions
-
framework/src/Volo.Abp.Mapperly/Volo/Abp/Mapperly/AbpMapperlyModule.cs
|
|
|
@ -1,4 +1,5 @@ |
|
|
|
using Microsoft.Extensions.DependencyInjection; |
|
|
|
using System.Linq; |
|
|
|
using Microsoft.Extensions.DependencyInjection; |
|
|
|
using Volo.Abp.Auditing; |
|
|
|
using Volo.Abp.Modularity; |
|
|
|
using Volo.Abp.ObjectExtending; |
|
|
|
@ -20,6 +21,11 @@ public class AbpMapperlyModule : AbpModule |
|
|
|
|
|
|
|
public override void ConfigureServices(ServiceConfigurationContext context) |
|
|
|
{ |
|
|
|
context.Services.AddMapperlyObjectMapper(); |
|
|
|
// This is the temporary solution, We will remove it in when all apps are migrated to Mapperly.
|
|
|
|
var autoMapperModule = context.Services.FirstOrDefault(x => x.ServiceType.FullName == "Volo.Abp.AutoMapper.AbpAutoMapperModule"); |
|
|
|
if (autoMapperModule == null) |
|
|
|
{ |
|
|
|
context.Services.AddMapperlyObjectMapper(); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|