예제 #1
0
        public IActionResult AddExam(Exam examToAdd)
        {
            var wasAddSuccessful = _examRepository.AddExam(examToAdd);

            if (wasAddSuccessful)
            {
                return(Ok());
            }

            return(Forbid());
        }
예제 #2
0
 public IActionResult addExam([FromBody] Exam model)
 {
     try
     {
         return(new ObjectResult(_exam.AddExam(model)));
     }
     catch
     {
         return(BadRequest());
     }
 }
 public int AddExam(ExamModel examModel)
 {
     try
     {
         return(examRepository.AddExam(examModel));
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }
예제 #4
0
 public int AddExam(Exam exam)
 {
     return(examRepository.AddExam(exam));
 }