Exemplo n.º 1
0
        public ActionResult Create(ReleaseNote releasenote)
        {
            if (ModelState.IsValid)
            {
                db.ReleaseNotes.Add(releasenote);
                db.SaveChanges();
                return RedirectToAction("Details", "Release", new { id = releasenote.ReleaseId });
            }

            ViewBag.ReleaseId = new SelectList(db.Releases, "ID", "Name", releasenote.ReleaseId);
            return View(releasenote);
        }
Exemplo n.º 2
0
 public ActionResult Edit(ReleaseNote releasenote)
 {
     if (ModelState.IsValid)
     {
         db.Entry(releasenote).State = EntityState.Modified;
         db.SaveChanges();
         return RedirectToAction("Details", "Release", new { id = releasenote.ReleaseId });
     }
     ViewBag.ReleaseId = new SelectList(db.Releases, "ID", "Name", releasenote.ReleaseId);
     return View(releasenote);
 }