public async Task <ActionResult> DeleteConfirmed(int id) { Syuukasaki syuukasaki = await db.Syuukasakis.FindAsync(id); db.Syuukasakis.Remove(syuukasaki); await db.SaveChangesAsync(); return(RedirectToAction("Index")); }
public async Task <ActionResult> Edit([Bind(Include = "Id,UserId,ZyuusyorokuId,EriaId")] Syuukasaki syuukasaki) { if (ModelState.IsValid) { db.Entry(syuukasaki).State = EntityState.Modified; await db.SaveChangesAsync(); return(RedirectToAction("Index")); } return(View(syuukasaki)); }
public async Task <ActionResult> Create([Bind(Include = "Id,UserId,ZyuusyorokuId,EriaId")] Syuukasaki syuukasaki) { if (ModelState.IsValid) { db.Syuukasakis.Add(syuukasaki); await db.SaveChangesAsync(); return(RedirectToAction("Index")); } return(View(syuukasaki)); }
// GET: Syuukasakis/Delete/5 public async Task <ActionResult> Delete(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } Syuukasaki syuukasaki = await db.Syuukasakis.FindAsync(id); if (syuukasaki == null) { return(HttpNotFound()); } return(View(syuukasaki)); }