public ActionResult Edit(int id) { var vm = new CreateEditThemaVM(); vm.Thema = repoThema.GetById(id); return(View(vm)); }
public ActionResult Edit(CreateEditThemaVM vm) { try { repoThema.Update(vm.Thema); return(RedirectToAction("Index")); } catch { return(View()); } }
public ActionResult Create(CreateEditThemaVM vm) { try { repoThema.Insert(vm.Thema); return(RedirectToAction("Index")); } catch (Exception e) { Debug.WriteLine(e.Message); return(View()); } }
public ActionResult Create() { var vm = new CreateEditThemaVM(); return(View(vm)); }