public IActionResult AddTag() { var model = new AddRemoveTagBaseModel { AddRemoveTagInputModel = new AddRemoveTagInputModel(), TagsNames = this.addonsService.GetAllTags(), }; return(this.View(model)); }
public async Task <IActionResult> RemoveTag(AddRemoveTagBaseModel model) { if (this.ModelState.IsValid) { var tuple = await this.addonsService.RemoveTag(model.AddRemoveTagInputModel.Name); this.TempData[tuple.Item1] = tuple.Item2; } else { this.TempData["Error"] = ErrorMessages.InvalidInputModel; return(this.RedirectToAction("AddTag", "BlogAddons", model)); } return(this.RedirectToAction("AddTag", "BlogAddons")); }