2020-10-15 13:34:25 +00:00
|
|
|
|
using AutoMapper;
|
|
|
|
|
using AutoMapper.Configuration;
|
|
|
|
|
|
|
|
|
|
namespace COA.EnterpriseServices.DataAccess
|
|
|
|
|
{
|
|
|
|
|
public static class Mapping
|
|
|
|
|
{
|
|
|
|
|
public static IMapper GetMapper()
|
|
|
|
|
{
|
2020-10-15 17:47:44 +00:00
|
|
|
|
var configuration = new MapperConfigurationExpression();
|
|
|
|
|
|
|
|
|
|
configuration.AddProfile<MappingProfile>();
|
2020-10-15 13:34:25 +00:00
|
|
|
|
|
2020-10-15 17:47:44 +00:00
|
|
|
|
var mapperConfig = new MapperConfiguration(configuration);
|
2020-10-15 13:34:25 +00:00
|
|
|
|
|
|
|
|
|
return new Mapper(mapperConfig);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|