Пример #1
0
        public ActionResult DeleteConfirmed(int id)
        {
            Dex.TrocaGames.Dominio.Console console = _repositorio.SelectPorID(id);
            _repositorio.Delete(console);

            return(RedirectToAction("Index"));
        }
Пример #2
0
 public ActionResult Edit([Bind(Include = "Id,Nome,DataLancamento")] Dex.TrocaGames.Dominio.Console console)
 {
     if (ModelState.IsValid)
     {
         _repositorio.Update(console);
         return(RedirectToAction("Index"));
     }
     return(View(console));
 }
Пример #3
0
 // GET: Consoles/Delete/5
 public ActionResult Delete(int?id)
 {
     if (id == null)
     {
         return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
     }
     Dex.TrocaGames.Dominio.Console console = _repositorio.SelectPorID(id.Value);
     if (console == null)
     {
         return(HttpNotFound());
     }
     return(View(console));
 }