using System.ComponentModel; using System.ComponentModel.DataAnnotations; using System.Web.DynamicData; // Attach the DailySaleMetadata to the DailySale class [MetadataType(typeof(EventMetadata))] public partial class Event { } [TableName("Event")] public class EventMetadata { //Override the display name [DisplayName("Event Name")] public object EventName { get; set; } [DefaultValue("mm-dd-yyyy")] [DisplayName("Event Date")] [DisplayFormat(DataFormatString = "{0:MM-dd-yy}")] [UIHint("CalendarDateTime")] public object EventDate { get; set; } [DisplayName("Event Location")] public object EventLocation { get; set; } [DisplayName("Event Price")] [DisplayFormat(DataFormatString = "{0:c}")] public object EventPrice { get; set; } [DisplayName("Total Tickets Issued")] public object TotalTicketsIssued { get; set; } }