using Entities.Contracts; using Entities.DTO; using Microsoft.EntityFrameworkCore; using SharedDATA.Api; using TechHelper.Repository; namespace TechHelper.Server.Repositories { public class ExamRepository : IExamRepository { private readonly IUnitOfWork _unitOfWork; private readonly IRepository _assignmentRepo; private readonly IRepository _questionRepo; public ExamRepository(IUnitOfWork unitOfWork) { _unitOfWork = unitOfWork; _assignmentRepo = _unitOfWork.GetRepository(); } public async Task GetFullExamByIdAsync(Guid assignmentId) { return null; } public async Task> GetExamPreviewsByUserAsync(Guid userId) { return await _assignmentRepo.GetAllAsync( predicate: a => a.CreatorId == userId && !a.IsDeleted); } public async Task AddAsync(Assignment assignment) { await _assignmentRepo.InsertAsync(assignment); } public async Task AddAsync(QuestionGroupDto qg) { if (qg.ValidQuestionGroup) { } } public async Task AddAsync(AssignmentQuestion assignment) { } public async Task AddAsync(Question assignment) { } public async Task AddAsync(AssignmentClass assignment) { } } }