public IActionResult Put([FromBody] AnnotationHistoryViewModel annotationHistoryViewModel)
        {
            if (!IsValidModelState())
            {
                return(Response());
            }

            var annotationCommand = _mapper.Map <UpdateAnnotationCommand>(annotationHistoryViewModel);

            _mediator.SendCommand(annotationCommand);
            return(Response(annotationCommand));
        }
        public IActionResult Edit(AnnotationHistoryViewModel annotationViewModel)
        {
            if (!ModelState.IsValid)
            {
                return(View(annotationViewModel));
            }

            _annotationAppService.Update(annotationViewModel);

            if (IsValidOperation())
            {
                return(RedirectToAction("Index"));
            }

            return(View(annotationViewModel));
        }
Example #3
0
        public void Update(AnnotationHistoryViewModel annotationViewModel)
        {
            var updateAnnotationCommand = _mapper.Map <UpdateAnnotationCommand>(annotationViewModel);

            _bus.SendCommand(updateAnnotationCommand);
        }
Example #4
0
        public void Register(AnnotationHistoryViewModel annotationViewModel)
        {
            var registerHistoryCommand = _mapper.Map <RegisterAnnotationCommand>(annotationViewModel);

            _bus.SendCommand(registerHistoryCommand);
        }