这是老师
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; }
}
我还有两个实体,我需要映射到DTO
public class AllCourseDto
{
public string Name { get; set; }
public string TeacherName { get; set; }
public string DateStart { get; set; }
public string DateEnd { get; set;}
}
我想将Teacher
映射到AllCoursesDTO
,你能解释一下,我如何调整我的Mapper,当前映射到AllCourseDTO
?