From b59977838ae64418da8c45bb5cc49bae7e376dfb Mon Sep 17 00:00:00 2001 From: "bastien.ollier1@etu.uca.fr" Date: Fri, 27 Jan 2023 16:18:31 +0100 Subject: [PATCH] add controller --- Sources/apiLOL/Controllers/LolController.cs | 83 +++++++++++++++++++++ 1 file changed, 83 insertions(+) create mode 100644 Sources/apiLOL/Controllers/LolController.cs diff --git a/Sources/apiLOL/Controllers/LolController.cs b/Sources/apiLOL/Controllers/LolController.cs new file mode 100644 index 0000000..def4571 --- /dev/null +++ b/Sources/apiLOL/Controllers/LolController.cs @@ -0,0 +1,83 @@ +using Microsoft.AspNetCore.Http; +using Microsoft.AspNetCore.Mvc; + +namespace apiLOL.Controllers +{ + public class LolController : Controller + { + // GET: LolController + public ActionResult Index() + { + return View(); + } + + // GET: LolController/Details/5 + public ActionResult Details(int id) + { + return View(); + } + + // GET: LolController/Create + public ActionResult Create() + { + return View(); + } + + // POST: LolController/Create + [HttpPost] + [ValidateAntiForgeryToken] + public ActionResult Create(IFormCollection collection) + { + try + { + return RedirectToAction(nameof(Index)); + } + catch + { + return View(); + } + } + + // GET: LolController/Edit/5 + public ActionResult Edit(int id) + { + return View(); + } + + // POST: LolController/Edit/5 + [HttpPost] + [ValidateAntiForgeryToken] + public ActionResult Edit(int id, IFormCollection collection) + { + try + { + return RedirectToAction(nameof(Index)); + } + catch + { + return View(); + } + } + + // GET: LolController/Delete/5 + public ActionResult Delete(int id) + { + return View(); + } + + // POST: LolController/Delete/5 + [HttpPost] + [ValidateAntiForgeryToken] + public ActionResult Delete(int id, IFormCollection collection) + { + try + { + return RedirectToAction(nameof(Index)); + } + catch + { + return View(); + } + } + } +}