Exemple #1
0
 public async Task CheckYearLock(Guid academicYearId)
 {
     if (await _academicYearRepository.IsLocked(academicYearId))
     {
         throw new InvalidDataException("Academic year is locked and cannot be modified.");
     }
 }
Exemple #2
0
 public static async Task CheckLock(IAcademicYearRepository academicYearRepository, Guid academicYearId)
 {
     if (await academicYearRepository.IsLocked(academicYearId))
     {
         throw new LogicException("This academic year is locked and cannot be modified.");
     }
 }
Exemple #3
0
 public async Task <bool> IsLocked(Guid academicYearId)
 {
     return(await _academicYearRepository.IsLocked(academicYearId));
 }