Файли
openidea/fixtures/aspnet-app/ViewComponents/SeatsLeftViewComponent.cs
T
Glitched Polygons GmbH 75ec6c51a3 feat(csharp): Razor / cshtml / ASP.NET Core MVC support (#7256)
Razor (.cshtml/.razor) gets syntax highlighting, Roslyn's built-in Razor support with the HTML parts projected to the HTML language server (ordered open/close, a reserved projection URI, scoped capability registrations), and MVC navigation between controller actions and their views, including explicit View("...") names, subfolders and areas.

Closes #615

Co-authored-by: GlitchedPolygons <[email protected]>
2026-12-02 16:32:46 +08:00

11 рядки
339 B
C#

using Microsoft.AspNetCore.Mvc;
using Ticketing.Models;
namespace Ticketing.ViewComponents;
/// <summary>A badge with the seats of a show, used as <c>&lt;vc:seats-left show="…" /&gt;</c>.</summary>
public sealed class SeatsLeftViewComponent : ViewComponent
{
public IViewComponentResult Invoke(Show show) => View(show.Capacity);
}