public ActionResult DeleteConfirmed(string id) { Destete destete = db.Destetes.Find(id); db.Destetes.Remove(destete); db.SaveChanges(); return(RedirectToAction("Index")); }
public ActionResult Edit([Bind(Include = "CodigoId,CodiGanadero,Zona,Color,Raza,Sexo,FechaDestete,Peso,Enfermedad,Medicamentos")] Destete destete) { if (ModelState.IsValid) { db.Entry(destete).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(destete)); }
// GET: Destetes/Delete/5 public ActionResult Delete(string id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } Destete destete = db.Destetes.Find(id); if (destete == null) { return(HttpNotFound()); } return(View(destete)); }