Browse Source

Merge branch 'dev' into ai

pull/23533/head
enisn 1 year ago
parent
commit
c42fdbf521
No known key found for this signature in database GPG Key ID: A052619F04155D1C
  1. 3
      abp_io/AbpIoLocalization/AbpIoLocalization/Admin/Localization/Resources/en.json
  2. 159
      docs/en/framework/infrastructure/object-to-object-mapping.md
  3. 9
      docs/en/studio/release-notes.md
  4. 1
      docs/en/studio/version-mapping.md
  5. 2
      framework/src/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap/TagHelpers/Tab/AbpTabsTagHelperService.cs
  6. 2
      modules/permission-management/src/Volo.Abp.PermissionManagement.Blazor/AbpPermissionManagementBlazorModule.cs
  7. 1
      modules/permission-management/src/Volo.Abp.PermissionManagement.Blazor/Volo.Abp.PermissionManagement.Blazor.csproj
  8. 18
      modules/permission-management/src/Volo.Abp.PermissionManagement.Web/AbpPermissionManagementWebAutoMapperProfile.cs
  9. 33
      modules/permission-management/src/Volo.Abp.PermissionManagement.Web/AbpPermissionManagementWebMappers.cs
  10. 10
      modules/permission-management/src/Volo.Abp.PermissionManagement.Web/AbpPermissionManagementWebModule.cs
  11. 2
      modules/permission-management/src/Volo.Abp.PermissionManagement.Web/Volo.Abp.PermissionManagement.Web.csproj
  12. 11
      modules/setting-management/src/Volo.Abp.SettingManagement.Blazor/AbpSettingManagementBlazorModule.cs
  13. 15
      modules/setting-management/src/Volo.Abp.SettingManagement.Blazor/SettingManagementBlazorAutoMapperProfile.cs
  14. 31
      modules/setting-management/src/Volo.Abp.SettingManagement.Blazor/SettingManagementBlazorMappers.cs
  15. 2
      modules/setting-management/src/Volo.Abp.SettingManagement.Blazor/Volo.Abp.SettingManagement.Blazor.csproj
  16. 10
      modules/setting-management/src/Volo.Abp.SettingManagement.Web/AbpSettingManagementWebModule.cs
  17. 14
      modules/setting-management/src/Volo.Abp.SettingManagement.Web/SettingManagementWebAutoMapperProfile.cs
  18. 22
      modules/setting-management/src/Volo.Abp.SettingManagement.Web/SettingManagementWebMappers.cs
  19. 2
      modules/setting-management/src/Volo.Abp.SettingManagement.Web/Volo.Abp.SettingManagement.Web.csproj

3
abp_io/AbpIoLocalization/AbpIoLocalization/Admin/Localization/Resources/en.json

@ -774,6 +774,7 @@
"Menu:TelemetryMenu": "Telemetry Reports", "Menu:TelemetryMenu": "Telemetry Reports",
"Menu:Studio": "Studio", "Menu:Studio": "Studio",
"Menu:Solutions": "Solutions", "Menu:Solutions": "Solutions",
"Menu:Users": "Users" "Menu:Users": "Users",
"Menu:UserReports": "Users"
} }
} }

159
docs/en/framework/infrastructure/object-to-object-mapping.md

@ -320,6 +320,165 @@ var users = await _userRepository.GetListAsync(); // returns List<User>
var dtos = ObjectMapper.Map<List<User>, List<UserDto>>(users); // creates List<UserDto> var dtos = ObjectMapper.Map<List<User>, List<UserDto>>(users); // creates List<UserDto>
```` ````
### Nested Mapping
When working with nested object mapping, there's an important limitation to be aware of. If you have separate mappers for nested types like in the example below, the parent mapper (`SourceTypeToDestinationTypeMapper`) will not automatically use the nested mapper (`SourceNestedTypeToDestinationNestedTypeMapper`) to handle the mapping of nested properties. This means that configurations like the `MapperIgnoreTarget` attribute on the nested mapper will be ignored during the parent mapping operation.
````csharp
public class SourceNestedType
{
public string Name { get; set; }
public string Ignored { get; set; }
}
public class SourceType
{
public string Name { get; set; }
public SourceNestedType Nested { get; set; }
}
public class DestinationNestedType
{
public string Name { get; set; }
public string Ignored { get; set; }
}
public class DestinationType
{
public string Name { get; set; }
public DestinationNestedType Nested { get; set; }
}
[Mapper]
public partial class SourceTypeToDestinationTypeMapper : MapperBase<SourceType, DestinationType>
{
public override partial DestinationType Map(SourceType source);
public override partial void Map(SourceType source, DestinationType destination);
}
[Mapper]
public partial class SourceNestedTypeToDestinationNestedTypeMapper : MapperBase<SourceNestedType, DestinationNestedType>
{
[MapperIgnoreTarget(nameof(SourceNestedType.Ignored))]
public override partial DestinationNestedType Map(SourceNestedType source);
[MapperIgnoreTarget(nameof(SourceNestedType.Ignored))]
public override partial void Map(SourceNestedType source, DestinationNestedType destination);
}
````
There are several ways to solve this nested mapping issue. Choose the approach that best fits your specific requirements:
#### Solution 1: Multi-Interface Implementation
Implement both mapping interfaces (`IAbpMapperlyMapper<SourceType, DestinationType>` and `IAbpMapperlyMapper<SourceNestedType, DestinationNestedType>`) in a single mapper class. This approach consolidates all related mapping logic into one class.
**Important:** Remember to implement `ITransientDependency` to register the mapper class with the dependency injection container.
````csharp
[Mapper]
public partial class SourceTypeToDestinationTypeMapper : IAbpMapperlyMapper<SourceType, DestinationType>, IAbpMapperlyMapper<SourceNestedType, DestinationNestedType>, ITransientDependency
{
public partial DestinationType Map(SourceType source);
public partial void Map(SourceType source, DestinationType destination);
public void BeforeMap(SourceType source)
{
}
public void AfterMap(SourceType source, DestinationType destination)
{
}
[MapperIgnoreTarget(nameof(SourceNestedType.Ignored))]
public partial DestinationNestedType Map(SourceNestedType source);
[MapperIgnoreTarget(nameof(SourceNestedType.Ignored))]
public partial void Map(SourceNestedType source, DestinationNestedType destination);
public void BeforeMap(SourceNestedType source)
{
}
public void AfterMap(SourceNestedType source, DestinationNestedType destination)
{
}
}
````
#### Solution 2: Consolidate Mapping Methods
Copy the nested mapping methods from `SourceNestedTypeToDestinationNestedTypeMapper` to the parent `SourceTypeToDestinationTypeMapper` class. This ensures all mapping logic is contained within a single mapper.
Example:
````csharp
[Mapper]
public partial class SourceTypeToDestinationTypeMapper : MapperBase<SourceType, DestinationType>
{
public override partial DestinationType Map(SourceType source);
public override partial void Map(SourceType source, DestinationType destination);
[MapperIgnoreTarget(nameof(SourceNestedType.Ignored))]
public override partial DestinationNestedType Map(SourceNestedType source);
[MapperIgnoreTarget(nameof(SourceNestedType.Ignored))]
public override partial void Map(SourceNestedType source, DestinationNestedType destination);
}
[Mapper]
public partial class SourceNestedTypeToDestinationNestedTypeMapper : MapperBase<SourceNestedType, DestinationNestedType>
{
[MapperIgnoreTarget(nameof(SourceNestedType.Ignored))]
public override partial DestinationNestedType Map(SourceNestedType source);
[MapperIgnoreTarget(nameof(SourceNestedType.Ignored))]
public override partial void Map(SourceNestedType source, DestinationNestedType destination);
}
````
#### Solution 3: Dependency Injection Approach
Inject the nested mapper as a dependency into the parent mapper and use it in the `AfterMap` method to handle nested object mapping manually.
Example:
````csharp
[Mapper]
public partial class SourceTypeToDestinationTypeMapper : MapperBase<SourceType, DestinationType>
{
private readonly SourceNestedTypeToDestinationNestedTypeMapper _sourceNestedTypeToDestinationNestedTypeMapper;
public SourceTypeToDestinationTypeMapper(SourceNestedTypeToDestinationNestedTypeMapper sourceNestedTypeToDestinationNestedTypeMapper)
{
_sourceNestedTypeToDestinationNestedTypeMapper = sourceNestedTypeToDestinationNestedTypeMapper;
}
public override partial DestinationType Map(SourceType source);
public override partial void Map(SourceType source, DestinationType destination);
public override void AfterMap(SourceType source, DestinationType destination)
{
if (source.Nested != null)
{
destination.Nested = _sourceNestedTypeToDestinationNestedTypeMapper.Map(source.Nested);
}
}
}
````
#### Choosing the Right Solution
Each solution has its own advantages:
- **Solution 1** consolidates all mapping logic in one place and works well when mappings are tightly related.
- **Solution 2** is simple but can lead to code duplication if you need the nested mapper elsewhere.
- **Solution 3** maintains separation of concerns and reusability but requires manual mapping in the `AfterMap` method.
Choose the approach that best aligns with your application's architecture and maintainability requirements.
### More Mapperly Features ### More Mapperly Features
Most of Mapperly's features such as `Ignore` can be configured through its attributes. See the [Mapperly documentation](https://mapperly.riok.app/docs/intro/) for more details. Most of Mapperly's features such as `Ignore` can be configured through its attributes. See the [Mapperly documentation](https://mapperly.riok.app/docs/intro/) for more details.

9
docs/en/studio/release-notes.md

@ -2,6 +2,15 @@
This document contains **brief release notes** for each ABP Studio release. Release notes only include **major features** and **visible enhancements**. Therefore, they don't include all the development done in the related version. This document contains **brief release notes** for each ABP Studio release. Release notes only include **major features** and **visible enhancements**. Therefore, they don't include all the development done in the related version.
## 1.2.1 (2025-08-14)
* Upgraded template dependencies for ABP Framework and LeptonX. (targeting ABP `9.3.1`)
* Migrated templates to standalone structure for Angular UI.
* Allowed relating tools with Kubernetes Services (allows to browse tools dashboard those are running in k8s).
* Made several enhancements for Solution Runner.
* Added test projects to **Application (Single Layer)** template (optional).
## 1.1.2 (2025-07-31) ## 1.1.2 (2025-07-31)
* Upgraded template dependencies for ABP Framework and LeptonX. (targeting ABP `9.2.3`) * Upgraded template dependencies for ABP Framework and LeptonX. (targeting ABP `9.2.3`)

1
docs/en/studio/version-mapping.md

@ -4,6 +4,7 @@ This document provides a general overview of the relationship between various ve
| **ABP Studio Version** | **ABP Version of Startup Template** | | **ABP Studio Version** | **ABP Version of Startup Template** |
|------------------------|---------------------------| |------------------------|---------------------------|
| 1.2.1 | 9.3.1 |
| 1.1.2 | 9.2.3 | | 1.1.2 | 9.2.3 |
| 1.1.0 - 1.1.1 | 9.2.2 | | 1.1.0 - 1.1.1 | 9.2.2 |
| 1.0.2 | 9.2.1 | | 1.0.2 | 9.2.1 |

2
framework/src/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap/TagHelpers/Tab/AbpTabsTagHelperService.cs

@ -84,7 +84,7 @@ public class AbpTabsTagHelperService : AbpTagHelperService<AbpTabsTagHelper>
var id = TagHelper.Name + "Content"; var id = TagHelper.Name + "Content";
var wrapper = new TagBuilder("div"); var wrapper = new TagBuilder("div");
wrapper.AddCssClass("tab-content pt-3"); wrapper.AddCssClass("tab-content");
wrapper.Attributes.Add("id", id); wrapper.Attributes.Add("id", id);
wrapper.InnerHtml.AppendHtml(contents); wrapper.InnerHtml.AppendHtml(contents);

2
modules/permission-management/src/Volo.Abp.PermissionManagement.Blazor/AbpPermissionManagementBlazorModule.cs

@ -1,6 +1,5 @@
using Localization.Resources.AbpUi; using Localization.Resources.AbpUi;
using Volo.Abp.AspNetCore.Components.Web.Theming; using Volo.Abp.AspNetCore.Components.Web.Theming;
using Volo.Abp.AutoMapper;
using Volo.Abp.Localization; using Volo.Abp.Localization;
using Volo.Abp.Modularity; using Volo.Abp.Modularity;
using Volo.Abp.PermissionManagement.Localization; using Volo.Abp.PermissionManagement.Localization;
@ -9,7 +8,6 @@ namespace Volo.Abp.PermissionManagement.Blazor;
[DependsOn( [DependsOn(
typeof(AbpAspNetCoreComponentsWebThemingModule), typeof(AbpAspNetCoreComponentsWebThemingModule),
typeof(AbpAutoMapperModule),
typeof(AbpPermissionManagementApplicationContractsModule) typeof(AbpPermissionManagementApplicationContractsModule)
)] )]
public class AbpPermissionManagementBlazorModule : AbpModule public class AbpPermissionManagementBlazorModule : AbpModule

1
modules/permission-management/src/Volo.Abp.PermissionManagement.Blazor/Volo.Abp.PermissionManagement.Blazor.csproj

@ -9,7 +9,6 @@
<ItemGroup> <ItemGroup>
<ProjectReference Include="..\..\..\..\framework\src\Volo.Abp.AspNetCore.Components.Web.Theming\Volo.Abp.AspNetCore.Components.Web.Theming.csproj" /> <ProjectReference Include="..\..\..\..\framework\src\Volo.Abp.AspNetCore.Components.Web.Theming\Volo.Abp.AspNetCore.Components.Web.Theming.csproj" />
<ProjectReference Include="..\..\..\..\framework\src\Volo.Abp.AutoMapper\Volo.Abp.AutoMapper.csproj" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>

18
modules/permission-management/src/Volo.Abp.PermissionManagement.Web/AbpPermissionManagementWebAutoMapperProfile.cs

@ -1,18 +0,0 @@
using AutoMapper;
using Volo.Abp.AutoMapper;
using Volo.Abp.PermissionManagement.Web.Pages.AbpPermissionManagement;
namespace Volo.Abp.PermissionManagement.Web;
public class AbpPermissionManagementWebAutoMapperProfile : Profile
{
public AbpPermissionManagementWebAutoMapperProfile()
{
CreateMap<PermissionGroupDto, PermissionManagementModal.PermissionGroupViewModel>().Ignore(p => p.IsAllPermissionsGranted);
CreateMap<PermissionGrantInfoDto, PermissionManagementModal.PermissionGrantInfoViewModel>()
.ForMember(p => p.Depth, opts => opts.Ignore());
CreateMap<ProviderInfoDto, PermissionManagementModal.ProviderInfoViewModel>();
}
}

33
modules/permission-management/src/Volo.Abp.PermissionManagement.Web/AbpPermissionManagementWebMappers.cs

@ -0,0 +1,33 @@
using Riok.Mapperly.Abstractions;
using Volo.Abp.Mapperly;
using static Volo.Abp.PermissionManagement.Web.Pages.AbpPermissionManagement.PermissionManagementModal;
namespace Volo.Abp.PermissionManagement.Web;
[Mapper]
public partial class PermissionGroupDtoToPermissionGroupViewModelMapper : MapperBase<PermissionGroupDto, PermissionGroupViewModel>
{
[MapperIgnoreTarget(nameof(PermissionGroupViewModel.IsAllPermissionsGranted))]
public override partial PermissionGroupViewModel Map(PermissionGroupDto source);
[MapperIgnoreTarget(nameof(PermissionGroupViewModel.IsAllPermissionsGranted))]
public override partial void Map(PermissionGroupDto source, PermissionGroupViewModel destination);
}
[Mapper]
public partial class PermissionGrantInfoDtoToPermissionGrantInfoViewModelMapper : MapperBase<PermissionGrantInfoDto, PermissionGrantInfoViewModel>
{
[MapperIgnoreTarget(nameof(PermissionGrantInfoViewModel.Depth))]
public override partial PermissionGrantInfoViewModel Map(PermissionGrantInfoDto source);
[MapperIgnoreTarget(nameof(PermissionGrantInfoViewModel.Depth))]
public override partial void Map(PermissionGrantInfoDto source, PermissionGrantInfoViewModel destination);
}
[Mapper]
public partial class ProviderInfoDtoToProviderInfoViewModelMapper : MapperBase<ProviderInfoDto, ProviderInfoViewModel>
{
public override partial ProviderInfoViewModel Map(ProviderInfoDto source);
public override partial void Map(ProviderInfoDto source, ProviderInfoViewModel destination);
}

10
modules/permission-management/src/Volo.Abp.PermissionManagement.Web/AbpPermissionManagementWebModule.cs

@ -1,8 +1,8 @@
using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.DependencyInjection;
using Volo.Abp.AspNetCore.Mvc.Localization; using Volo.Abp.AspNetCore.Mvc.Localization;
using Volo.Abp.AspNetCore.Mvc.UI.Bootstrap; using Volo.Abp.AspNetCore.Mvc.UI.Bootstrap;
using Volo.Abp.AutoMapper;
using Volo.Abp.Http.ProxyScripting.Generators.JQuery; using Volo.Abp.Http.ProxyScripting.Generators.JQuery;
using Volo.Abp.Mapperly;
using Volo.Abp.Modularity; using Volo.Abp.Modularity;
using Volo.Abp.PermissionManagement.Localization; using Volo.Abp.PermissionManagement.Localization;
using Volo.Abp.VirtualFileSystem; using Volo.Abp.VirtualFileSystem;
@ -11,7 +11,7 @@ namespace Volo.Abp.PermissionManagement.Web;
[DependsOn(typeof(AbpPermissionManagementApplicationContractsModule))] [DependsOn(typeof(AbpPermissionManagementApplicationContractsModule))]
[DependsOn(typeof(AbpAspNetCoreMvcUiBootstrapModule))] [DependsOn(typeof(AbpAspNetCoreMvcUiBootstrapModule))]
[DependsOn(typeof(AbpAutoMapperModule))] [DependsOn(typeof(AbpMapperlyModule))]
public class AbpPermissionManagementWebModule : AbpModule public class AbpPermissionManagementWebModule : AbpModule
{ {
public override void PreConfigureServices(ServiceConfigurationContext context) public override void PreConfigureServices(ServiceConfigurationContext context)
@ -34,11 +34,7 @@ public class AbpPermissionManagementWebModule : AbpModule
options.FileSets.AddEmbedded<AbpPermissionManagementWebModule>(); options.FileSets.AddEmbedded<AbpPermissionManagementWebModule>();
}); });
context.Services.AddAutoMapperObjectMapper<AbpPermissionManagementWebModule>(); context.Services.AddMapperlyObjectMapper<AbpPermissionManagementWebModule>();
Configure<AbpAutoMapperOptions>(options =>
{
options.AddProfile<AbpPermissionManagementWebAutoMapperProfile>(validate: true);
});
Configure<DynamicJavaScriptProxyOptions>(options => Configure<DynamicJavaScriptProxyOptions>(options =>
{ {

2
modules/permission-management/src/Volo.Abp.PermissionManagement.Web/Volo.Abp.PermissionManagement.Web.csproj

@ -31,7 +31,7 @@
<ItemGroup> <ItemGroup>
<ProjectReference Include="..\Volo.Abp.PermissionManagement.Application.Contracts\Volo.Abp.PermissionManagement.Application.Contracts.csproj" /> <ProjectReference Include="..\Volo.Abp.PermissionManagement.Application.Contracts\Volo.Abp.PermissionManagement.Application.Contracts.csproj" />
<ProjectReference Include="..\..\..\..\framework\src\Volo.Abp.AspNetCore.Mvc.UI.Bootstrap\Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.csproj" /> <ProjectReference Include="..\..\..\..\framework\src\Volo.Abp.AspNetCore.Mvc.UI.Bootstrap\Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.csproj" />
<ProjectReference Include="..\..\..\..\framework\src\Volo.Abp.AutoMapper\Volo.Abp.AutoMapper.csproj" /> <ProjectReference Include="..\..\..\..\framework\src\Volo.Abp.Mapperly\Volo.Abp.Mapperly.csproj" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>

11
modules/setting-management/src/Volo.Abp.SettingManagement.Blazor/AbpSettingManagementBlazorModule.cs

@ -2,8 +2,8 @@
using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.DependencyInjection;
using Volo.Abp.AspNetCore.Components.Web.Theming; using Volo.Abp.AspNetCore.Components.Web.Theming;
using Volo.Abp.AspNetCore.Components.Web.Theming.Routing; using Volo.Abp.AspNetCore.Components.Web.Theming.Routing;
using Volo.Abp.AutoMapper;
using Volo.Abp.Localization; using Volo.Abp.Localization;
using Volo.Abp.Mapperly;
using Volo.Abp.Modularity; using Volo.Abp.Modularity;
using Volo.Abp.SettingManagement.Blazor.Menus; using Volo.Abp.SettingManagement.Blazor.Menus;
using Volo.Abp.SettingManagement.Blazor.Settings; using Volo.Abp.SettingManagement.Blazor.Settings;
@ -13,7 +13,7 @@ using Volo.Abp.UI.Navigation;
namespace Volo.Abp.SettingManagement.Blazor; namespace Volo.Abp.SettingManagement.Blazor;
[DependsOn( [DependsOn(
typeof(AbpAutoMapperModule), typeof(AbpMapperlyModule),
typeof(AbpAspNetCoreComponentsWebThemingModule), typeof(AbpAspNetCoreComponentsWebThemingModule),
typeof(AbpSettingManagementApplicationContractsModule) typeof(AbpSettingManagementApplicationContractsModule)
)] )]
@ -21,12 +21,7 @@ public class AbpSettingManagementBlazorModule : AbpModule
{ {
public override void ConfigureServices(ServiceConfigurationContext context) public override void ConfigureServices(ServiceConfigurationContext context)
{ {
context.Services.AddAutoMapperObjectMapper<AbpSettingManagementBlazorModule>(); context.Services.AddMapperlyObjectMapper<AbpSettingManagementBlazorModule>();
Configure<AbpAutoMapperOptions>(options =>
{
options.AddProfile<SettingManagementBlazorAutoMapperProfile>(validate: true);
});
Configure<AbpNavigationOptions>(options => Configure<AbpNavigationOptions>(options =>
{ {

15
modules/setting-management/src/Volo.Abp.SettingManagement.Blazor/SettingManagementBlazorAutoMapperProfile.cs

@ -1,15 +0,0 @@
using AutoMapper;
using Volo.Abp.SettingManagement.Blazor.Pages.SettingManagement.EmailSettingGroup;
namespace Volo.Abp.SettingManagement.Blazor;
public class SettingManagementBlazorAutoMapperProfile : Profile
{
public SettingManagementBlazorAutoMapperProfile()
{
CreateMap<EmailSettingGroupViewComponent.UpdateEmailSettingsViewModel, UpdateEmailSettingsDto>();
CreateMap<EmailSettingsDto, EmailSettingGroupViewComponent.UpdateEmailSettingsViewModel>();
CreateMap<EmailSettingGroupViewComponent.SendTestEmailViewModel, SendTestEmailInput>();
}
}

31
modules/setting-management/src/Volo.Abp.SettingManagement.Blazor/SettingManagementBlazorMappers.cs

@ -0,0 +1,31 @@
using Riok.Mapperly.Abstractions;
using Volo.Abp.Mapperly;
using static Volo.Abp.SettingManagement.Blazor.Pages.SettingManagement.EmailSettingGroup.EmailSettingGroupViewComponent;
namespace Volo.Abp.SettingManagement.Blazor;
[Mapper]
public partial class UpdateEmailSettingsViewModelToUpdateEmailSettingsDtoMapper : MapperBase<UpdateEmailSettingsViewModel, UpdateEmailSettingsDto>
{
public override partial UpdateEmailSettingsDto Map(UpdateEmailSettingsViewModel source);
public override partial void Map(UpdateEmailSettingsViewModel source, UpdateEmailSettingsDto destination);
}
[Mapper]
public partial class EmailSettingsDtoToUpdateEmailSettingsViewModelMapper : MapperBase<EmailSettingsDto, UpdateEmailSettingsViewModel>
{
public override partial UpdateEmailSettingsViewModel Map(EmailSettingsDto source);
public override partial void Map(EmailSettingsDto source, UpdateEmailSettingsViewModel destination);
}
[Mapper]
public partial class SendTestEmailViewModelToSendTestEmailInputMapper : MapperBase<SendTestEmailViewModel, SendTestEmailInput>
{
public override partial SendTestEmailInput Map(SendTestEmailViewModel source);
public override partial void Map(SendTestEmailViewModel source, SendTestEmailInput destination);
}

2
modules/setting-management/src/Volo.Abp.SettingManagement.Blazor/Volo.Abp.SettingManagement.Blazor.csproj

@ -9,7 +9,7 @@
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>
<ProjectReference Include="..\..\..\..\framework\src\Volo.Abp.AutoMapper\Volo.Abp.AutoMapper.csproj" /> <ProjectReference Include="..\..\..\..\framework\src\Volo.Abp.Mapperly\Volo.Abp.Mapperly.csproj" />
<ProjectReference Include="..\..\..\..\framework\src\Volo.Abp.AspNetCore.Components.Web.Theming\Volo.Abp.AspNetCore.Components.Web.Theming.csproj" /> <ProjectReference Include="..\..\..\..\framework\src\Volo.Abp.AspNetCore.Components.Web.Theming\Volo.Abp.AspNetCore.Components.Web.Theming.csproj" />
</ItemGroup> </ItemGroup>

10
modules/setting-management/src/Volo.Abp.SettingManagement.Web/AbpSettingManagementWebModule.cs

@ -1,8 +1,8 @@
using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.DependencyInjection;
using Volo.Abp.AspNetCore.Mvc.Localization; using Volo.Abp.AspNetCore.Mvc.Localization;
using Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared; using Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared;
using Volo.Abp.AutoMapper;
using Volo.Abp.Http.ProxyScripting.Generators.JQuery; using Volo.Abp.Http.ProxyScripting.Generators.JQuery;
using Volo.Abp.Mapperly;
using Volo.Abp.Modularity; using Volo.Abp.Modularity;
using Volo.Abp.SettingManagement.Localization; using Volo.Abp.SettingManagement.Localization;
using Volo.Abp.SettingManagement.Web.Navigation; using Volo.Abp.SettingManagement.Web.Navigation;
@ -15,7 +15,7 @@ namespace Volo.Abp.SettingManagement.Web;
[DependsOn( [DependsOn(
typeof(AbpSettingManagementApplicationContractsModule), typeof(AbpSettingManagementApplicationContractsModule),
typeof(AbpAutoMapperModule), typeof(AbpMapperlyModule),
typeof(AbpAspNetCoreMvcUiThemeSharedModule), typeof(AbpAspNetCoreMvcUiThemeSharedModule),
typeof(AbpSettingManagementDomainSharedModule) typeof(AbpSettingManagementDomainSharedModule)
)] )]
@ -58,10 +58,6 @@ public class AbpSettingManagementWebModule : AbpModule
options.DisableModule(SettingManagementRemoteServiceConsts.ModuleName); options.DisableModule(SettingManagementRemoteServiceConsts.ModuleName);
}); });
context.Services.AddAutoMapperObjectMapper<AbpSettingManagementWebModule>(); context.Services.AddMapperlyObjectMapper<AbpSettingManagementWebModule>();
Configure<AbpAutoMapperOptions>(options =>
{
options.AddProfile<SettingManagementWebAutoMapperProfile>(validate: true);
});
} }
} }

14
modules/setting-management/src/Volo.Abp.SettingManagement.Web/SettingManagementWebAutoMapperProfile.cs

@ -1,14 +0,0 @@
using AutoMapper;
using Volo.Abp.SettingManagement.Web.Pages.SettingManagement.Components.EmailSettingGroup;
namespace Volo.Abp.SettingManagement.Web;
public class SettingManagementWebAutoMapperProfile : Profile
{
public SettingManagementWebAutoMapperProfile()
{
CreateMap<EmailSettingsDto, EmailSettingGroupViewComponent.UpdateEmailSettingsViewModel>();
CreateMap<SendTestEmailModal.SendTestEmailViewModel, SendTestEmailInput>();
}
}

22
modules/setting-management/src/Volo.Abp.SettingManagement.Web/SettingManagementWebMappers.cs

@ -0,0 +1,22 @@
using Riok.Mapperly.Abstractions;
using Volo.Abp.Mapperly;
using static Volo.Abp.SettingManagement.Web.Pages.SettingManagement.Components.EmailSettingGroup.EmailSettingGroupViewComponent;
using static Volo.Abp.SettingManagement.Web.Pages.SettingManagement.Components.EmailSettingGroup.SendTestEmailModal;
namespace Volo.Abp.SettingManagement.Web;
[Mapper]
public partial class EmailSettingsDtoToUpdateEmailSettingsViewModelMapper : MapperBase<EmailSettingsDto, UpdateEmailSettingsViewModel>
{
public override partial UpdateEmailSettingsViewModel Map(EmailSettingsDto source);
public override partial void Map(EmailSettingsDto source, UpdateEmailSettingsViewModel destination);
}
[Mapper]
public partial class SendTestEmailViewModelToSendTestEmailInputMapper : MapperBase<SendTestEmailViewModel, SendTestEmailInput>
{
public override partial SendTestEmailInput Map(SendTestEmailViewModel source);
public override partial void Map(SendTestEmailViewModel source, SendTestEmailInput destination);
}

2
modules/setting-management/src/Volo.Abp.SettingManagement.Web/Volo.Abp.SettingManagement.Web.csproj

@ -15,7 +15,7 @@
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>
<ProjectReference Include="..\..\..\..\framework\src\Volo.Abp.AutoMapper\Volo.Abp.AutoMapper.csproj" /> <ProjectReference Include="..\..\..\..\framework\src\Volo.Abp.Mapperly\Volo.Abp.Mapperly.csproj" />
<ProjectReference Include="..\..\..\..\framework\src\Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared\Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared.csproj" /> <ProjectReference Include="..\..\..\..\framework\src\Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared\Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared.csproj" />
<ProjectReference Include="..\..\..\..\framework\src\Volo.Abp.Localization\Volo.Abp.Localization.csproj" /> <ProjectReference Include="..\..\..\..\framework\src\Volo.Abp.Localization\Volo.Abp.Localization.csproj" />
<ProjectReference Include="..\Volo.Abp.SettingManagement.Domain.Shared\Volo.Abp.SettingManagement.Domain.Shared.csproj" /> <ProjectReference Include="..\Volo.Abp.SettingManagement.Domain.Shared\Volo.Abp.SettingManagement.Domain.Shared.csproj" />

Loading…
Cancel
Save