public async Task <ActionResult> DeleteConfirmed(int id) { dia dia = await db.dias.FindAsync(id); db.dias.Remove(dia); await db.SaveChangesAsync(); return(RedirectToAction("Index")); }
public async Task <ActionResult> Edit([Bind(Include = "id,dias")] dia dia) { if (ModelState.IsValid) { db.Entry(dia).State = EntityState.Modified; await db.SaveChangesAsync(); return(RedirectToAction("Index")); } return(PartialView(dia)); }
public async Task <ActionResult> Create([Bind(Include = "id,dias")] dia dia) { if (ModelState.IsValid) { db.dias.Add(dia); await db.SaveChangesAsync(); return(RedirectToAction("Index")); } return(PartialView(dia)); }
// GET: dias/Delete/5 public async Task <ActionResult> Delete(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } dia dia = await db.dias.FindAsync(id); if (dia == null) { return(HttpNotFound()); } return(PartialView(dia)); }
public persona(short E, string N, dia F) { Edad = E; Nombre = N; Dia_Favorito = F; }