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