using AutoMapper;
using ECMJobRunner.Application.Common.Dtos;
using ECMJobRunner.Domain.Entities;
namespace ECMJobRunner.Application.Common.Mapping
{
///
/// AutoMapper profile for CfgProfile and ProfileSqlJob mappings
/// Maps domain entities to DTOs
///
public class ProfileMappingProfile : Profile
{
///
/// Configures AutoMapper mappings for and entities
///
public ProfileMappingProfile()
{
// CfgProfile -> CfgProfileDto
CreateMap()
.ForMember(dest => dest.SqlJobs, opt => opt.MapFrom(src => src.SqlJobs));
// ProfileSqlJob -> ProfileSqlJobDto
CreateMap();
}
}
}