chore: removed everything related to instructions

This commit is contained in:
2025-09-20 22:42:33 +03:00
parent b6778046c2
commit 8ea18f1096
50 changed files with 0 additions and 1953 deletions

View File

@@ -18,12 +18,6 @@ public class ApplicationContext : IdentityDbContext<ApplicationUser, Application
public DbSet<UserRole> UserRoles { get; set; }
public DbSet<RoleRight> RoleRights { get; set; }
public DbSet<UserProfile> UserProfiles { get; set; }
public DbSet<Instruction> Instructions { get; set; }
public DbSet<InstructionCategory> InstructionCategories { get; set; }
public DbSet<InstructionParagraph> InstructionParagraphs { get; set; }
public DbSet<InstructionTest> InstructionTests { get; set; }
public DbSet<InstructionTestQuestion> InstructionTestQuestions { get; set; }
public DbSet<InstructionTestResult> InstructionTestResults { get; set; }
protected override void OnModelCreating(ModelBuilder modelBuilder)
{
@@ -34,17 +28,5 @@ public class ApplicationContext : IdentityDbContext<ApplicationUser, Application
modelBuilder.Entity<RoleRight>()
.HasKey(rr => new { rr.RoleId, rr.RightId });
modelBuilder.Entity<InstructionTest>()
.HasMany(itq => itq.Questions);
modelBuilder.Entity<InstructionTestResult>()
.HasOne(itr => itr.InstructionTest);
modelBuilder.Entity<Instruction>()
.HasOne(i => i.Category);
modelBuilder.Entity<Instruction>()
.HasMany(i => i.Paragraphs);
}
}

View File

@@ -14,12 +14,6 @@ public class UnitOfWork : IDisposable
private GenericRepository<RefreshToken> _refreshTokenRepository;
private GenericRepository<RoleRight> _roleRightRepository;
private GenericRepository<UserRole> _userRoleRepository;
private GenericRepository<Instruction> _instructionRepository;
private GenericRepository<InstructionParagraph> _instructionParagraphRepository;
private GenericRepository<InstructionCategory> _instructionCategoryRepository;
private GenericRepository<InstructionTest> _instructionTestRepository;
private GenericRepository<InstructionTestQuestion> _instructionTestQuestionRepository;
private GenericRepository<InstructionTestResult> _instructionTestResultRepository;
#endregion
@@ -105,83 +99,8 @@ public class UnitOfWork : IDisposable
return _userRoleRepository;
}
}
public GenericRepository<Instruction> InstructionRepository
{
get
{
if (this._instructionRepository == null)
{
this._instructionRepository = new GenericRepository<Instruction>(_context);
}
return _instructionRepository;
}
}
public GenericRepository<InstructionParagraph> InstructionParagraphRepository
{
get
{
if (this._instructionParagraphRepository == null)
{
this._instructionParagraphRepository = new GenericRepository<InstructionParagraph>(_context);
}
return _instructionParagraphRepository;
}
}
public GenericRepository<InstructionCategory> InstructionCategoryRepository
{
get
{
if (this._instructionCategoryRepository == null)
{
this._instructionCategoryRepository = new GenericRepository<InstructionCategory>(_context);
}
return _instructionCategoryRepository;
}
}
public GenericRepository<InstructionTest> InstructionTestRepository
{
get
{
if (this._instructionTestRepository == null)
{
this._instructionTestRepository = new GenericRepository<InstructionTest>(_context);
}
return _instructionTestRepository;
}
}
public GenericRepository<InstructionTestQuestion> InstructionTestQuestionRepository
{
get
{
if (this._instructionTestQuestionRepository == null)
{
this._instructionTestQuestionRepository = new GenericRepository<InstructionTestQuestion>(_context);
}
return _instructionTestQuestionRepository;
}
}
public GenericRepository<InstructionTestResult> InstructionTestResultRepository
{
get
{
if (this._instructionTestResultRepository == null)
{
this._instructionTestResultRepository = new GenericRepository<InstructionTestResult>(_context);
}
return _instructionTestResultRepository;
}
}
#endregion
public bool Save()
{