asp.net - Automapper: Mapping from any type to property of generic type -


lets have following generic type:

class a<t> {    public t value {get; set;} } 

now have these 2 classes:

class source {    public string name {get; set;}    public int age {get; set;} } class destination {    public a<string> name {get; set;}    public a<int> age {get; set;} } 

class source , class destination contain hundres of attributes in current project, , have lot of different types (not string , int, in example). configure automapper, map any type has mapping set property "value" in target type. possible, or have configure mapping type?


Comments

Popular posts from this blog

'hasOwnProperty' in javascript -

python - ValueError: No axis named 1 for object type <class 'pandas.core.series.Series'> -

Command prompt result in label. Python 2.7 -