Help me put with this mapping profile
Asjad Butt
66
Reputation points
So there is this add class method and is giving a maping type error i amunable to understand why
[HttpPost]
public async Task<IActionResult> AddClass(StudyClassDto studyClassDto)
{
var studyclass = mapper.Map<StudyClass>(studyClassDto);
uow.StudyClassRepository.AddStudyClass(studyclass);
await uow.SaveAsync();
return Ok();
}
and the mapping type
CreateMap<StudyClassDto, StudyClass>()
.ForMember(dest => dest.AppUserId, opt => opt.MapFrom(src => src.TeacherId));
i just need the id here