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.
OptifitWebService/Server/Mappers/TrainingProgramProfile.cs

19 lines
546 B

using AutoMapper;
using Infrastructure.Entities;
using Server.Dto.Request;
using Server.Dto.Response;
namespace Server.Mappers
{
public class TrainingProgramProfile : Profile
{
public TrainingProgramProfile()
{
CreateMap<TrainingProgram, ResponseTrainingProgramDto>()
.ForMember(dest => dest.Sessions, opt => opt.MapFrom(src => src.Sessions));
CreateMap<RequestTrainingProgramDto, TrainingProgram>()
.ForMember(dest => dest, opt => opt.Ignore());
}
}
}