Skip to content

Conversation

KaranChadha10
Copy link
Contributor

**Description

This PR contains the following points:**

  • Introduced MapsterConfiguration (Nop.Core.Infrastructure.Mapper) to hold the global TypeAdapterConfig and IMapper.
  • Removed AutoMapper package and usages:
  • Deleted from Nop.Core.csproj.
  • Removed AutoMapperConfiguration class and its test.
  • Cleared AutoMapper using directives where applicable.

Why Mapster

  • No commercial licensing concerns.
  • Faster mapping with fewer allocations; supports compile-time generation.
  • Simple, explicit configuration via TypeAdapterConfig.

Issue Link: #7673

@KaranChadha10 KaranChadha10 marked this pull request as draft August 18, 2025 12:44
@skoshelev skoshelev linked an issue Aug 18, 2025 that may be closed by this pull request
@skoshelev
Copy link
Contributor

Hi @KaranChadha10.

Hi, I looked at the changes, superficially for now, since this task is scheduled for a future release.

Overall, everything is fine, I just don't agree with the need to create the GetMapper method. I would suggest using the static MapsterConfiguration class.

But we need to take into account the main point, we have not yet finally decided which mapper to switch to and whether to switch at all. Mapster looks good, but has not been updated for a long time. We would not like to face a situation where we switch to a deliberately unsupported library.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Replace AutoMapper with a new library
3 participants