Mapster
Mapster copied to clipboard
dotnet mapper ... -p generates code that can't be compiled.
We have POCOs with the same type name in different namespaces.
Adding -p fixes the ambiguous reference, but generates enum mapping like
Mapster.Utils.Enum<x.y.z.E>.Parse(Mapster.Utils.Enum<a.b.c.E>.ToString()),
that fails to compile with error
The type or namespace name 'Utils' does not exist in the namespace 'xxxxxxx'
Same for Mapster.TypeAdapter<T1,T2>
To fix, please render
using Mapster;
using Mapster.Utils;
and non-qualified Enum<SomeType>.Parse()... even if -p is requested.
Thanks