jasontaylordev / CleanArchitecture

Clean Architecture Solution Template for ASP.NET Core
MIT License
17.01k stars 3.64k forks source link

Replace AutoMapper with Mapperly #1206

Open neva1842 opened 3 months ago

neva1842 commented 3 months ago

Is your feature request related to a problem? Please describe. This feature request is not related to a problem. It is an exploratory idea to consider replacing AutoMapper with Mapperly.

Describe the solution you'd like I propose considering the replacement of Automapper with Mapperly in Jason Taylor's CleanArchitecture template. According to the benchmarks provided in this GitHub repository, Mapperly demonstrates superior performance compared to Automapper. This enhancement can potentially lead to performance gains in our applications. Moreover, Mapperly supports IQueryable projections, which aligns well with our existing use cases.

m2017atTR commented 2 months ago

Hi neva1842,

Automapper have support about projection .Project() ... https://ojdevelops.com/2015/09/using-automapper-in-entity-framework.html

fizmhd commented 1 month ago

Hi, We have used Mapperly in our project and it was not a good choice. Its a good library, when the mapping is direct, and simple mappings.

But when your property names are different, then you need to mention it by attributes. It grows longer, when you have many properties.

When it comes to mapping Child classes, it becomes harder.

So we had to move away from Mapperly, and use simple mapping classes.

Sharing, my feedback on library, I am not against it.