public IActionResult AddExam(Exam examToAdd) { var wasAddSuccessful = _examRepository.AddExam(examToAdd); if (wasAddSuccessful) { return(Ok()); } return(Forbid()); }
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; } }
public int AddExam(Exam exam) { return(examRepository.AddExam(exam)); }