cezarypiatek / MappingGenerator

:arrows_counterclockwise: "AutoMapper" like, Roslyn based, code fix provider that allows to generate mapping code in design time.
https://marketplace.visualstudio.com/items?itemName=54748ff9-45fc-43c2-8ec5-cf7912bc3b84.mappinggenerator
MIT License
1.03k stars 120 forks source link

Inherited properties not generating #44

Closed aeslinger0 closed 5 years ago

aeslinger0 commented 5 years ago

I have an entity that inherits Microsoft.AspNet.Identity.EntityFramework.IdentityUser from packages\Microsoft.AspNet.Identity.EntityFramework.2.2.1\lib\net45\Microsoft.AspNet.Identity.EntityFramework.dll. The properties in my entity get mapped, but not the ones from IdentityUser such as "Email". Here's what the method starts out as:

public static ApplicationUserEntity ToEntity(this UserModel model)
{
}
cezarypiatek commented 5 years ago

Thanks for reporting. There is a problem with checking visibility of fields in types which are not declared in the source code. I will need to investigate that. I will let you know when I find the solution.

cezarypiatek commented 5 years ago

@aeslinger0 Here's a new package version that should contains fix for this issue https://ci.appveyor.com/api/buildjobs/mwll3jx0755e5qxv/artifacts/MappingGenerator%2FMappingGenerator%2FMappingGenerator.Vsix%2Fbin%2FRelease%2FMappingGenerator.vsix

Would you mind to test it and confirm if everything is working as you expected?

aeslinger0 commented 5 years ago

Sorry, I haven't had a chance to test it yet. I will as soon as I'm able to.

aeslinger0 commented 5 years ago

That appears to work, thanks.

cezarypiatek commented 5 years ago

Thanks for testing. It should be released in few days.