Exemple #1
0
        public ActionResult DeleteConfirmed(int id)
        {
            Monitor monitor = _monitorService.GetById(id);

            _monitorService.Delete(id);
            return(RedirectToAction("Index"));
        }
Exemple #2
0
        public ActionResult Delete(int Id)
        {
            if (service.Delete(Id))
            {
                BackgroundJob.Enqueue(() => index.DeleteItem(Id));

                return(RedirectToAction("Index"));
            }
            else
            {
                return(View("Error"));
            }
        }
Exemple #3
0
        public IActionResult Delete(string id)
        {
            if (id == null)
            {
                return(BadRequest());
            }

            bool monitor = monitorService.Delete(id);

            if (monitor == false)
            {
                return(NotFound());
            }

            return(Ok());
        }