Esempio n. 1
0
        public IActionResult CreateExam([FromBody] RequestCreateExam _exam)
        {
            Exam entity;

            if (ModelState.IsValid)
            {
                entity = _examServices.CreateExam(_exam);
                _examServices.Commit();
                return(Created($"api/exam/{entity.Id}", _exam));
            }
            else
            {
                return(BadRequest());
            }
        }