When you setup edition to have monthly and annual price and go edit again it fails to show price you set. While price is set in database correctly, mapping between database object and dto object fails to map decimals. Here is a link where it fails.
editionEditDto = ObjectMapper.Map<EditionEditDto>(edition);
edition has values for monthlyprice and annualprice, while editionEditDto has them as nulls after mapping.
Any advise how to fix this bug?
4 Answer(s)
-
0
It might be related to a missing map in CustomDtoMapper.cs that added in v5.1:
<span style="color:#FF0000">- configuration.CreateMap<EditionEditDto, SubscribableEdition>();</span> <span style="color:#008000">+ configuration.CreateMap<EditionEditDto, SubscribableEdition>().ReverseMap();</span>
-
0
See: [https://github.com/aspnetzero/aspnet-zero-core/issues/706#event-1406083638])
-
0
Thanks, I just downloaded asp.net zero bundle 1 week ago, so I got an old version! Hmmmm.
Is there an easy way to bring the version or I have to import one fix at a time?
-
0
Is there an easy way to bring the version or I have to import one fix at a time?
How to migrate existing solution: https://github.com/aspnetzero/aspnet-zero/issues/96#issuecomment-268093697
For this fix, you can just make that single-line change.