Help me put with this mapping profile

Asjad Butt 66 Reputation points
2022-11-25T08:12:50.833+00:00

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

ASP.NET Core
ASP.NET Core
A set of technologies in the .NET Framework for building web applications and XML web services.
4,134 questions
ASP.NET
ASP.NET
A set of technologies in the .NET Framework for building web applications and XML web services.
3,243 questions
{count} votes