using AutoMapper;
using IRaCIS.Application.Contracts;
using IRaCIS.Core.Application.Service.WorkLoad.DTO;
using static IRaCIS.Core.Application.Service.TestService;

namespace IRaCIS.Core.Application.Service
{
    public class WorkLoadConfig : Profile
    {
        public WorkLoadConfig()
        {
            CreateMap<WorkloadCommand, Workload>();

            CreateMap<Workload, WorkloadDTO>();

            CreateMap<EnrollCommand, Enroll>();

            CreateMap<SetCriterionJoinJoinAnalysisCommand, EnrollReadingCriterion>().ReverseMap();

            CreateMap<TestModel, TestModel2>()
                 .ForAllMembers(opts => opts.Condition((src, dest, srcMember) => srcMember != null));


        }
    }

}
