public void AddDiscipline(string name)
 {
     try
     {
         disciplineRepository.AddDiscipline(name);
     }
     catch (DuplicateEntryException ex)
     {
         throw new InvalidInputException(ex.Message);
     }
     catch (InvalidDataFormatException ex)
     {
         throw new InvalidInputException($"The field(s): '{ex.InvalidFields}' should not be empty");
     }
     catch (DatabaseException ex)
     {
         throw new ConnectionException(ex.Message);
     }
 }
Beispiel #2
0
 private IEntityDTO AddDiscipline(string disciplineName, int facultyID)
 => _disRep.AddDiscipline(disciplineName, facultyID);