fluentsprings / ExpressMapper

Mapping .Net types
http://www.expressmapper.org
Other
310 stars 65 forks source link

Fixed mapping for overriden properties. #64

Closed vacero closed 8 years ago

vacero commented 8 years ago

I detected a problem when trying to map an overriden property in a child class. The problem is that GetProperty method throws an Exception when trying to find the Property by name because it is defined in the parent and in the child classes, it's ambiguous.

The proposed solution is to just use the ´memberExpression.Member´ as the PropertyInfo.

All tests were run without problems.

anisimovyuriy commented 8 years ago

Dear viacgo,

I appreciate your effort and contribution to Expressmapper! Just one thing could you please provide unit test for it?

Also you can apply the same change for "Function" method

Thanks a lot, Yours Yuriy

vacero commented 8 years ago

Hello @anisimovyuriy.

I added a test for this. Please check.

If I need to change anything else, let me know.

anisimovyuriy commented 8 years ago

Dear viacgo,

Thanks a lot for your contribution and improvements to Expressmapper!

Gratefully Yours, Yuriy