public async Task <ActionResult> DeleteConfirmed(int id) { Quesos quesos = await db.Quesos.FindAsync(id); db.Quesos.Remove(quesos); await db.SaveChangesAsync(); return(RedirectToAction("Index")); }
public async Task <ActionResult> Edit(Quesos quesos) { if (ModelState.IsValid) { db.Entry(quesos).State = EntityState.Modified; await db.SaveChangesAsync(); return(RedirectToAction("Index")); } return(View(quesos)); }
public async Task <ActionResult> Create(Quesos quesos) { if (ModelState.IsValid) { db.Quesos.Add(quesos); await db.SaveChangesAsync(); return(RedirectToAction("Index")); } return(View(quesos)); }
// GET: Quesos/Delete/5 public async Task <ActionResult> Delete(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } Quesos quesos = await db.Quesos.FindAsync(id); if (quesos == null) { return(HttpNotFound()); } return(View(quesos)); }