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)); }
public void Update(AnnotationHistoryViewModel annotationViewModel) { var updateAnnotationCommand = _mapper.Map <UpdateAnnotationCommand>(annotationViewModel); _bus.SendCommand(updateAnnotationCommand); }
public void Register(AnnotationHistoryViewModel annotationViewModel) { var registerHistoryCommand = _mapper.Map <RegisterAnnotationCommand>(annotationViewModel); _bus.SendCommand(registerHistoryCommand); }