Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Need a small improvement to the flatten name matching #147

Closed
RudeySH opened this issue Jan 5, 2018 · 6 comments
Closed

Need a small improvement to the flatten name matching #147

RudeySH opened this issue Jan 5, 2018 · 6 comments

Comments

@RudeySH
Copy link

RudeySH commented Jan 5, 2018

I just started using ExpressMapper and I'm already heavily relying on the flatten functionality. I like how it maps src.Inner.SomeProperty to dest.InnerSomeProperty. However, I am wondering, why can't it map src.Inner.SomeProperty to just dest.SomeProperty in cases where the outer class does not have a SomeProperty himself?

@RudeySH
Copy link
Author

RudeySH commented Jan 5, 2018

@JonPSmith Any thoughts on this? I noticed you were the one who implemented Flatten, you might have an answer for me :)

@JonPSmith
Copy link
Contributor

Hi @RudeySH,

The flattening I added is fairly basic, but I have written a long article that explains how it works.

I was planning to change from AutoMapper to ExpressMapper, but two things have stopped me from doing that:

@RudeySH
Copy link
Author

RudeySH commented Jan 5, 2018

Thanks @JonPSmith . In the meanwhile I have done some experimenting with ExpressMapper and I already feel like I should switch to AutoMapper because of all the issues I'm running in to.

Slightly off topic, but are the performance tests between ExpressMapper and other mappers purely focussed on the initial set up performance? I will maily be using mapping for EF queries and I am worried that AutoMapper will slow my queries down.

@JonPSmith
Copy link
Contributor

Hi @RudeySH,

It was a while ago but ExpressMapper and AutoMapper LINQ->EF were the same. They should produce similar LINQ and its then up to EF to convert it.

@RudeySH
Copy link
Author

RudeySH commented Jan 19, 2018

It turns out this is pretty easily done in AutoMapper. AutoMapper/AutoMapper#2489

@JonPSmith
Copy link
Contributor

Good to know. Thanks.

@RudeySH RudeySH closed this as completed Feb 24, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants