Describe the bug
AutoMapper is no longer implicitly supported via System.ComponentModel.TypeConverter because in v11.x supported was removed.
System.ComponentModel.TypeConverter is no longer supported
It was removed for performance reasons. So it’s best not to use it anymore. But if you must, there is a sample in the test project.
[x] in the IbanNet wiki it is still stated as such that it is supported including example code, which is inaccurate if one is to use the latest AutoMapper version.Documentation removed.
[x] in the IbanNet example folder there is an example that still uses AutoMapper v10.x where it still works, but after upgrading to v11/12 breaks.Example refactored.
To Reproduce
See above.
Expected behavior
There are a few options:
Document it properly that there is a workaround using TypeConverterMapper. (see the linked example on AutoMapper documentation page)
Provide an IbanNet.AutoMapper extension library. Probably overkill.
Remove the example and documentation, and let the user of IbanNet implement an integration in their own codebase (since AutoMapper is not the only object mapper out there). Reason being that this originally was just a 'happy coincidence' that it worked this way as an out-of-the-box feature.
Update the example and documentation to use AutoMapper's own type converter functionality and IIbanParser. (eg. to Iban with .ConvertUsing(s => ibanParser.Parse(s)) and to string .ConvertUsing(src => src.ToString("E"))
Option 4. is probably the best, except for the fact that IIbanParser may itself get deprecated as well in favor of Iban.Parse which does not yet exist.
Describe the bug AutoMapper is no longer implicitly supported via
System.ComponentModel.TypeConverter
because in v11.x supported was removed.https://docs.automapper.org/en/v12.0.0/11.0-Upgrade-Guide.html#system-componentmodel-typeconverter-is-no-longer-supported
However:
in the IbanNet wiki it is still stated as such that it is supported including example code, which is inaccurate if one is to use the latest AutoMapper version.Documentation removed.in the IbanNet example folder there is an example that still uses AutoMapper v10.x where it still works, but after upgrading to v11/12 breaks.Example refactored.To Reproduce See above.
Expected behavior There are a few options:
TypeConverterMapper
. (see the linked example on AutoMapper documentation page)IIbanParser
. (eg. to Iban with.ConvertUsing(s => ibanParser.Parse(s))
and to string.ConvertUsing(src => src.ToString("E"))
Option 4. is probably the best, except for the fact that
IIbanParser
may itself get deprecated as well in favor ofIban.Parse
which does not yet exist.IbanNet library/version
.NET runtime
Operating system
Additional context N/A