public static DocumentMainMessageResponse ToDocumentMainMessageResponse(this DocumentMainMessage response)
 {
     return(new DocumentMainMessageResponse
     {
         CmdId = response.CmdId,
         CorrelationId = response.CorrelationId,
         Id = response.Id
     });
 }
        public async Task <int> UpdateEncompassEvent(DocumentMainMessage mainMessage)
        {
            var processedEvent = mainMessage.ToWebhookEventQueueEntity();
            var affectedRows   = await _encompassEventRepository.UpdateEventAsync(processedEvent).ConfigureAwait(false);

            affectedRows = await _encompassEventRepository.RemoveEventAsync(mainMessage.Id).ConfigureAwait(false);

            return(affectedRows);
        }
 public static WebhookEventQueueEntity ToWebhookEventQueueEntity(this DocumentMainMessage documentDoneMessage)
 {
     return(new WebhookEventQueueEntity
     {
         Id = documentDoneMessage.Id,
         CorrelationId = documentDoneMessage.CorrelationId,
         EnqueueDtTm = documentDoneMessage.EnqueueDtTm,
         ErrorMsgTxt = documentDoneMessage.ErrorMsgTxt,
         FinishDtTm = documentDoneMessage.FinishDtTm,
         PickupDtTm = documentDoneMessage.PickupDtTm,
         StatusId = documentDoneMessage.StatusId,
         ThrottleId = documentDoneMessage.ThrottleId,
         WorkerId = documentDoneMessage.WorkerId
     });
 }