public ActionResult Edit(int id, Tag model)
 {
     try
     {
         TagRepository repo = new TagRepository();
         repo.UpdateTag(model);
         return RedirectToAction("Index");
     }
     catch
     {
         return View(model);
     }
 }
 public ActionResult Create(Tag model)
 {
     try
     {
         TagRepository repo = new TagRepository();
         repo.AddTag(model);
         return RedirectToAction("Index");
     }
     catch
     {
         return View(model);
     }
 }
 // GET: Tag/Edit/5
 public ActionResult Edit(int id)
 {
     TagRepository repo = new TagRepository();
     var model = repo.GetTagById(id);
     return View(model);
 }
 // GET: Tag
 public ActionResult Index()
 {
     TagRepository repo = new TagRepository();
     List<Tag> model = repo.GetAllTags();
     return View(model);
 }