private DeleteCategoryConfirmed ( int id ) : System.Web.Mvc.ActionResult | ||
id | int | |
리턴 | System.Web.Mvc.ActionResult |
public ActionResult DeleteCategoryConfirmed(int id)
{
Genre genre = db.Categories.Find(id);
db.Categories.Remove(genre);
db.SaveChanges();
return RedirectToAction("Categories");
}