public ActionResult EditTag(EditTagModel model) { if (!ModelState.IsValid) { return(PartialView("_EditTag", model)); } try { if (model.Id == 0) { _tagService.AddOne(model); } else { _tagService.UpdateOne(model); } } catch (Exception exception) { Log.RegisterError(exception); } return(RedirectToAction("TagIndex")); }