AsiignmentStruct
This commit is contained in:
@@ -50,10 +50,11 @@ namespace TechHelper.Context
|
||||
// =============================================================
|
||||
// ENTITY -> DTO Mappings (用于读取/查询)
|
||||
// =============================================================
|
||||
CreateMap<Assignment, AssignmentDto>()
|
||||
.ForMember(dest => dest.ExamStruct, opt => opt.MapFrom(src => src.ExamStruct));
|
||||
CreateMap<Assignment, AssignmentDto>();
|
||||
|
||||
CreateMap<QuestionContext, QuestionContextDto>().ReverseMap();
|
||||
|
||||
|
||||
CreateMap<AssignmentStruct, AssignmentStructDto>(); // 直接映射,因为成员现在对等了
|
||||
|
||||
// 新增!从实体到新的 DTO 的映射
|
||||
CreateMap<AssignmentQuestion, AssignmentQuestionDto>();
|
||||
@@ -64,7 +65,6 @@ namespace TechHelper.Context
|
||||
// DTO -> ENTITY Mappings (用于创建/更新) - 现在变得极其简单!
|
||||
// =================================================================
|
||||
CreateMap<AssignmentDto, Assignment>();
|
||||
CreateMap<AssignmentStructDto, AssignmentStruct>();
|
||||
|
||||
// 新增!从新的 DTO 到实体的映射
|
||||
CreateMap<AssignmentQuestionDto, AssignmentQuestion>();
|
||||
|
Reference in New Issue
Block a user