Beispiel #1
0
        public IActionResult Update([FromBody] SectionRequest request)
        {
            var search  = _sectionManager.GetSingleSection(request.Id);
            var section = Mapper.Map <Section>(request);

            if (search == null)
            {
                return(BadRequest());
            }

            section.ExamId = search.ExamId;
            var resultSection = _sectionManager.UpdateSection(section);

            return(Ok(resultSection));
        }
        public ActionResult Edit(Section section)
        {
            var message = _sectionManager.UpdateSection(section);

            return(RedirectToAction("AddSection"));
        }