mirror of
https://github.com/yawaflua/yaflay.ru.git
synced 2026-02-04 10:54:12 +02:00
82 lines
1.8 KiB
C#
82 lines
1.8 KiB
C#
using Microsoft.AspNetCore.Http;
|
||
using Microsoft.AspNetCore.Mvc;
|
||
|
||
namespace yaflay.ru.Новая_папка
|
||
{
|
||
[Route("")]
|
||
public class HomeController : Controller
|
||
{
|
||
// GET: HomeController
|
||
|
||
|
||
// GET: HomeController/Details/5
|
||
public ActionResult github()
|
||
{
|
||
return Redirect();
|
||
}
|
||
|
||
// GET: HomeController/Create
|
||
public ActionResult Create()
|
||
{
|
||
return View();
|
||
}
|
||
|
||
// POST: HomeController/Create
|
||
[HttpPost]
|
||
[ValidateAntiForgeryToken]
|
||
public ActionResult Create(IFormCollection collection)
|
||
{
|
||
try
|
||
{
|
||
return RedirectToAction(nameof(Index));
|
||
}
|
||
catch
|
||
{
|
||
return View();
|
||
}
|
||
}
|
||
|
||
// GET: HomeController/Edit/5
|
||
public ActionResult Edit(int id)
|
||
{
|
||
return View();
|
||
}
|
||
|
||
// POST: HomeController/Edit/5
|
||
[HttpPost]
|
||
[ValidateAntiForgeryToken]
|
||
public ActionResult Edit(int id, IFormCollection collection)
|
||
{
|
||
try
|
||
{
|
||
return RedirectToAction(nameof(Index));
|
||
}
|
||
catch
|
||
{
|
||
return View();
|
||
}
|
||
}
|
||
|
||
// GET: HomeController/Delete/5
|
||
public ActionResult Delete(int id)
|
||
{
|
||
return View();
|
||
}
|
||
|
||
// POST: HomeController/Delete/5
|
||
[HttpPost]
|
||
[ValidateAntiForgeryToken]
|
||
public ActionResult Delete(int id, IFormCollection collection)
|
||
{
|
||
try
|
||
{
|
||
return RedirectToAction(nameof(Index));
|
||
}
|
||
catch
|
||
{
|
||
return View();
|
||
}
|
||
}
|
||
}
|
||
}
|