public async Task <IActionResult> Delete(string id, [FromServices] IWorkflowService _service) { try { await _service.Delete(id); return(NoContent()); } catch (Exception ex) { return(BadRequest(ex.Message)); } }
public async Task <IHttpActionResult> DeleteWorkflow(string id) { Workflow workflow = workflowService.GetById(id); if (workflow == null) { return(NotFound()); } workflowService.Delete(workflow); workflowService.CommitAsync(); return(Ok(workflow)); }
public ActionResult Delete(string name) { workflow.Delete(name); return(new HttpStatusCodeResult(HttpStatusCode.OK)); }