Exemplo n.º 1
0
 public void InsertOrUpdate(RELEASE release)
 {
     if (release.ID == default(int)) {
         // New entity
         context.RELEASE.Add(release);
     } else {
         // Existing entity
         context.Entry(release).State = System.Data.Entity.EntityState.Modified;
     }
 }
Exemplo n.º 2
0
        public ActionResult Edit(RELEASE release)
        {
            if (ModelState.IsValid) {
                releaseRepository.InsertOrUpdate(release);
                releaseRepository.Save();
                return RedirectToAction("Index");
            } else {
				return View();
			}
        }