public ActionResult Delete(long id) { if (!ModelState.IsValid) { return(RedirectToAction("Index", "Error")); } _computerService.RemoveComputerById(id); _historyService.Insert(new History { Email = AuthHelper.GetUser(HttpContext).Email, Action = Action.Delete, DateTime = DateTime.Now, Entity = EntityEnum.Computer }); return(RedirectToAction("Index")); }