-
Notifications
You must be signed in to change notification settings - Fork 392
Closed
Description
for now I can have something like the following to register mapping for all enums in the system
config.NewConfig<Enum, KeyValueData>()
.MapWith(s => new KeyValueData(s, Enums.ResourceManager));
However, it's not possible to have the same cofig for a nullable Enum.
The following config is not working:
config.NewConfig<Enum?, KeyValueData?>()
.MapWith(s => s == null ? null : new KeyValueData(s.ToString(), Enums.ResourceManager));
I'll get the following Exception
Error while compiling
source=Tests.FirstClass
destination=Tests.SecondClass
type=Map
-> InnerException:
Error while compiling
source=System.Nullable`1[Model.IdentityType]
destination=Model.KeyValueData
type=Map
--> InnerException:
No default constructor for type 'KeyValueData', please use 'ConstructUsing' or 'MapWith'
Metadata
Metadata
Assignees
Labels
No labels