Initial commit
This commit is contained in:
19
GerstITS.Examples.Logic/Example/Mappings/IntegerMapping.cs
Normal file
19
GerstITS.Examples.Logic/Example/Mappings/IntegerMapping.cs
Normal file
@@ -0,0 +1,19 @@
|
||||
using AutoMapper;
|
||||
|
||||
namespace GerstITS.Examples.Logic.Example
|
||||
{
|
||||
internal sealed class IntegerMapping : Profile
|
||||
{
|
||||
#region Construtcors
|
||||
|
||||
public IntegerMapping()
|
||||
{
|
||||
CreateMap<int, Example>()
|
||||
.ForMember(x => x.FirstName, m => m.MapFrom((s,t) => $"First Name {s}"))
|
||||
.ForMember(x => x.LastName, m => m.MapFrom((s,t) => $"Last Name {s}"))
|
||||
.ForMember(x => x.Description, m => m.MapFrom((s,t) => $"Useful description for id '{s}'"));
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user