Custom mapping with AutoMapper
.NET (Core and Framework)
2
Posts
2
Posters
0
Views
1
Watching
-
So I have a class like so:
public class foo
{
int Code {get;set;}
String Meaning {get;set;}
}And I want to be able to map an integer type onto the Code property of this class:
int someNumber = 10;
foo someFoo = new foo();
AutoMapper.Mapper.Map(someNumber, someFoo);I've tried a few different things but haven't gotten it to work. Any suggestions, please ?
-
So I have a class like so:
public class foo
{
int Code {get;set;}
String Meaning {get;set;}
}And I want to be able to map an integer type onto the Code property of this class:
int someNumber = 10;
foo someFoo = new foo();
AutoMapper.Mapper.Map(someNumber, someFoo);I've tried a few different things but haven't gotten it to work. Any suggestions, please ?