How to configure AutoMapper to map entities

161 views Asked by At

This is Teacher

public class Teacher

{
    public int Id { get; set; }

    public string Education { get; set; }

    public string Expereince { get; set; }

    public List<Courses> Courses { get; set; }

    public int UserId { get; set; }

    public User Users { get; set; }
}

I have 2 more entities, that I need mapping to DTO

public class AllCourseDto
{
    public string Name { get; set; }

    public string TeacherName { get; set; }

    public string DateStart { get; set; }

    public string DateEnd { get; set;}
}

I want to map Teacher to AllCoursesDTO, could you explain, how I need tune my Mapper, that currently mapping to AllCourseDTO?

0

There are 0 answers