homework/Controllers/CatalogController.cs
2026-09-14 01:49:15 +05:00

21 lines
805 B
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.

// подключаем базовые классы MVC
using Microsoft.AspNetCore.Mvc;
// подключаем модель ошибки
using TechnoWorld.Models;
// контроллер каталога — отвечает за страницу с карточками товаров
namespace TechnoWorld.Controllers;
public class CatalogController : Controller
{
// метод Index — страница каталога
// вызывается когда пользователь заходит на /Catalog или /Catalog/Index
public IActionResult Index()
{
// ставим заголовок страницы
ViewData["Title"] = "Каталог";
// рендерим представление Views/Catalog/Index.cshtml
return View();
}
}