дзеркало
https://github.com/l0ng-ai/openidea.git
синхронізовано 2026-12-05 17:47:08 +02:00
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]>
25 рядки
622 B
C#
25 рядки
622 B
C#
using System.ComponentModel.DataAnnotations;
|
|
|
|
namespace Ticketing.Models;
|
|
|
|
public sealed class TicketOrder
|
|
{
|
|
[Required, StringLength(80), Display(Name = "Your name")]
|
|
public string Name { get; set; } = "";
|
|
|
|
[Required, EmailAddress, Display(Name = "E-mail")]
|
|
public string Email { get; set; } = "";
|
|
|
|
[Range(1, 10)]
|
|
public int Quantity { get; set; } = 1;
|
|
}
|
|
|
|
public sealed record BookingForm(Show Show, TicketOrder Order);
|
|
|
|
public sealed record BookingConfirmation(Show Show, int Quantity)
|
|
{
|
|
public decimal Total => Show.Price * Quantity;
|
|
}
|
|
|
|
public sealed record ErrorViewModel(string RequestId);
|