From d82e70362903a8f9333c2036cb272bca707c73f5 Mon Sep 17 00:00:00 2001
From: Mackinnon Buck
+ @foreach (var airline in (Airline[])Enum.GetValues(typeof(Airline)))
+ {
+
+ }
+
Accepts terms:
+ Airline:
+
@foreach (var airline in (Airline[])Enum.GetValues(typeof(Airline)))
{
-
}
@@ -118,15 +120,15 @@
public TicketClass TicketClass { get; set; }
[Required]
- [Range(typeof(Airline), nameof(Airline.Alaska), nameof(Airline.Southwest), ErrorMessage = "Don't fly Spirit")]
- public Airline Airline { get; set; } = Airline.Spirit;
+ [Range(typeof(Airline), nameof(Airline.BestAirline), nameof(Airline.NoNameAirline), ErrorMessage = "Pick a valid airline.")]
+ public Airline Airline { get; set; } = Airline.Unknown;
public string Username { get; set; }
}
enum TicketClass { Economy, Premium, First }
- enum Airline { Alaska, United, Southwest, Spirit }
+ enum Airline { BestAirline, CoolAirline, NoNameAirline, Unknown }
List
Accepts terms:
- Airline:
-
- @foreach (var airline in (Airline[])Enum.GetValues(typeof(Airline)))
- {
-
- }
-
+ Pick one color and one country:
+
+
+
+
+
+
+
+
Accepts terms:
-
@foreach (var airline in (Airline[])Enum.GetValues(typeof(Airline)))
@@ -54,8 +54,8 @@
Pick one color and one country:
-