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/SessionProfile.cs

19 lines
510 B

using AutoMapper;
using Infrastructure.Entities;
using Server.Dto.Request;
using Server.Dto.Response;
namespace Server.Mappers
{
public class SessionProfile : Profile
{
public SessionProfile()
{
CreateMap<Session, ResponseSessionDto>()
.ForMember(dest => dest.Exercices, opt => opt.MapFrom(src => src.Exercices));
CreateMap<RequestSessionDto, Session>()
.ForMember(dest => dest.Exercices, opt => opt.Ignore());
}
}
}