public RedirectToRouteResult Delete(Type type) { if (type.Id.HasValue) { _typeService.Delete(type.Id.Value); } return(RedirectToAction("Index")); }