Files
yaflay.ru/Новая папка/HomeController.cs
Дмитрий Шиманский 7aa373c48b Добавьте файлы проекта.
2023-10-19 18:35:41 +03:00

82 lines
1.8 KiB
C#
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
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();
}
}
}
}