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