我要重新整理结构,这是这阶段的保存
This commit is contained in:
@@ -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)
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -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();
|
||||||
|
Reference in New Issue
Block a user