using System.ComponentModel; using System.ComponentModel.DataAnnotations; using System.Web.DynamicData; // Attach the BankDepositMetadata to the BankDeposit class [MetadataType(typeof(BankDepositMetadata))] public partial class BankDeposit { } [TableName("Bank Deposit")] public class BankDepositMetadata { //Override the display name [DisplayName("Date Deposit")] [DefaultValue("mm-dd-yyyy")] [DisplayFormat(DataFormatString = "{0:MM-dd-yyyy}")] [UIHint("CalendarDateTime")] public object DateDeposit { get; set; } [DisplayName("Amount Deposit")] [DisplayFormat(DataFormatString = "{0:c}")] public object AmountDeposit { get; set; } [DisplayName("Reference Number")] public object ReferenceNumber { get; set; } }