Ejemplo n.º 1
0
        public async Task <IActionResult> Delete(string id)
        {
            try
            {
                Guid jobId = new Guid(id);

                _jobManager.DeleteJobChildTables(jobId);
                var response = await base.DeleteEntity(id);

                //send SignalR notification to all connected clients
                await _hub.Clients.All.SendAsync("sendjobnotification", string.Format("Job id {0} deleted.", id));

                await _webhookPublisher.PublishAsync("Jobs.JobDeleted", id).ConfigureAwait(false);

                return(response);
            }
            catch (Exception ex)
            {
                return(ex.GetActionResult());
            }
        }