Esempio n. 1
0
        public async Task <IActionResult> Delete(string id)
        {
            try
            {
                Guid processId;
                Guid.TryParse(id, out processId);

                bool response = manager.DeleteProcess(processId);

                if (response)
                {
                    return(Ok());
                }
                else
                {
                    ModelState.AddModelError("Process Delete", "An error occured while deleting a process");
                    return(BadRequest(ModelState));
                }
            }
            catch (Exception ex)
            {
                return(ex.GetActionResult());
            }
        }