public ActionResult Retry(Guid id) { BookSagaEvent sagaEvent = bookSagaEventRepository.Get(id); var eventData = modelConverter.Convert(sagaEvent); mediatr.Publish(eventData); return(Ok()); }
public ITemplater AddTemplate(string content, object model) { var templateHtml = content; var dictonary = _modelConverter.Convert(model); foreach (var d in dictonary) { templateHtml = templateHtml.Replace($"{{{d.Key}}}", d.Value); } _htmlContent.Append(templateHtml); return(this); }
public async Task <PipelineResult> Manage(RecievedOrder order) { _logger.AddMessageDetail("Beginning order processing"); var pipelineData = _orderDataConverter.Convert(order); var pipelineResult = new PipelineResult(); try { await _pipelineDirector.Do(pipelineData, pipelineResult); } catch (Exception ex) { AssignException(pipelineResult, ex); _logger.AddErrorDetail(ex.Message); _logger.SubmitException(ex); await HandlePipelineException(pipelineData, pipelineResult); } return(pipelineResult); }
public ActionResult <IReadOnlyCollection <BookResponseModel> > Get() => Ok(bookReadRepository.Get().Select(x => modelConverter.Convert(x, GetHostUrl())));