我要重新整理结构,这是这阶段的保存

This commit is contained in:
SpecialX
2025-06-16 10:48:40 +08:00
parent 34ab5abbb0
commit f37262d72e
2 changed files with 20 additions and 0 deletions

View File

@@ -1,4 +1,5 @@
using Entities.Contracts; using Entities.Contracts;
using Entities.DTO;
using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore;
using SharedDATA.Api; using SharedDATA.Api;
@@ -9,6 +10,8 @@ namespace TechHelper.Server.Repository
private readonly IUnitOfWork _unitOfWork; private readonly IUnitOfWork _unitOfWork;
private readonly IRepository<Assignment> _assignmentRepo; private readonly IRepository<Assignment> _assignmentRepo;
private readonly IRepository<AssignmentGroup> _assignmentGroupRepo; private readonly IRepository<AssignmentGroup> _assignmentGroupRepo;
private readonly IRepository<QuestionGroup> _questionGroupRepo;
private readonly IRepository<Question> _questionRepo;
public ExamRepository(IUnitOfWork unitOfWork) public ExamRepository(IUnitOfWork unitOfWork)
{ {
@@ -80,5 +83,14 @@ namespace TechHelper.Server.Repository
{ {
await _assignmentRepo.InsertAsync(assignment); await _assignmentRepo.InsertAsync(assignment);
} }
public async Task AddAsync(QuestionGroupDto qg)
{
if(qg.ValidQuestionGroup)
{
}
}
} }
} }

View File

@@ -86,6 +86,14 @@ namespace TechHelper.Server.Services
return _mapper.Map<IEnumerable<ExamDto>>(assignments); return _mapper.Map<IEnumerable<ExamDto>>(assignments);
} }
public async Task AddAsync(QuestionGroupDto qg)
{
if (qg.ValidQuestionGroup)
{
var mapQG = _mapper.Map<QuestionGroup>(qg);
}
}
public Task<ApiResponse> GetAllAsync(QueryParameter query) public Task<ApiResponse> GetAllAsync(QueryParameter query)
{ {
throw new NotImplementedException(); throw new NotImplementedException();