public async Task <ActionResult <CheckResponseRequest> > Check(Guid id)
        {
            var result = await pgClient.FirstOrDefault <FindNotificationRequestQuery.Result>(new FindNotificationRequestQuery(id));

            if (result == null)
            {
                return(NotFound(new CheckResponseRequest {
                    ValidationResult = "Cannot find a notification request matching the supplied ID"
                }));
            }

            return(Ok(new CheckResponseRequest
            {
                NotificationStatusId = result.NotificationStatusId,
                CreatedAt = result.CreatedAt,
                StartedAt = result.StartedAt,
                CompletedAt = result.CompletedAt
            }));
        }
        private async Task <NotificationRequest> RetrieveRequestFromDatabase(string messageBody)
        {
            var queueMsq = JsonConvert.DeserializeObject <QueueMessage>(messageBody);

            return(await pgDataClient.FirstOrDefault <NotificationRequest>(new RetrieveNotificationRequest(queueMsq.RequestId)));
        }