You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

36 lines
1.1 KiB

using AutoMapper;
using DealerSelection.WebApi.Models;
namespace DealerSelection.WebApi;
public static class MapperConfig
{
private static MapperConfiguration Config { get; set; }
public static void Register()
{
Config = new MapperConfiguration(
cfg =>
{
cfg.CreateMap<Api.Models.Response, Response>();
cfg.CreateMap<Api.Models.MulesoftResponse, MulesoftResponse>();
cfg.CreateMap<CustomerDealerInfoRequest, Api.Models.CustomerDealerInfoRequest>();
});
}
public static Response MapResponse(Api.Models.Response from)
{
return Config.CreateMapper().Map<Response>(from);
}
public static MulesoftResponse MapMulesoftResponse(Api.Models.MulesoftResponse from)
{
return Config.CreateMapper().Map<Api.Models.MulesoftResponse, MulesoftResponse>(from);
}
public static Api.Models.CustomerDealerInfoRequest MapCustomerDealerInfoRequest(CustomerDealerInfoRequest from)
{
return Config.CreateMapper().Map<CustomerDealerInfoRequest, Api.Models.CustomerDealerInfoRequest>(from);
}
}