refactor: remove AutoMapper and replace with manual mapping due to licensing changes#1321
Closed
Kamyab7 wants to merge 2 commits intojasontaylordev:mainfrom
Kamyab7:remove-auto-mapper
Closed
refactor: remove AutoMapper and replace with manual mapping due to licensing changes#1321Kamyab7 wants to merge 2 commits intojasontaylordev:mainfrom Kamyab7:remove-auto-mapper
Kamyab7 wants to merge 2 commits intojasontaylordev:mainfrom
Kamyab7:remove-auto-mapper
Conversation
- Migrated all test assertions from FluentAssertions to Shouldly - Removed all FluentAssertions package references - Updated README to reflect use of Shouldly
- Removed AutoMapper configuration and usages - Introduced manual mapping methods for DTOs (e.g., TodoItemDto, TodoListDto, LookupDto) - Updated extension methods to support manual mapping (PaginatedListAsync, ProjectToListAsync) - Refactored query handlers to use manual mappers instead of ProjectTo<T> - Updated unit tests to reflect manual mapping and use Shouldly for assertions - Removed AutoMapper from the list of libraries in the README
|
With all due respect, I believe the best decision would have been to support ourselves with other libraries that are aiming to stand out in light of this potential situation with AutoMapper. There are some well-regarded alternatives, and it would have required even less refactoring. Additionally, our friend Jimmy Bogard communicated that the current versions can still be used, but maintenance is not a priority for them. |
Owner
|
Thank you for your contribution, however I'm going to continue using both AutoMapper and MediatR for the time being. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR removes AutoMapper from the application and replaces all usages with manual mapping functions.
🚨 Why?
AutoMapper has recently adopted a commercial license for production use. To avoid potential licensing issues and to keep the project open and dependency-light, this change removes AutoMapper entirely.
✅ Changes:
ProjectTo<T>(),.Map()calls, andProfileclasses with explicit mapping functionsTodoItemBriefDtoTodoItemDtoTodoListDtoLookupDtoFunc<TSource, TDestination>🧩 Dependency:
This PR depends on #1320, as it introduces the
Shouldlylibrary used in tests.📚 Housekeeping:
AutoMapperfrom the list of dependencies in the README🔒 Closes: #1206