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

Command prompt result in label. Python 2.7 -

javascript - How do I use URL parameters to change link href on page? -

amazon web services - AWS Route53 Trying To Get Site To Resolve To www -