I have extracted the relevant code for you to focus on:
[MetadataTypeAttribute(typeof(StudentAttendance.StudentAttendanceMetadata))]
[DisplayName("Student Attendance Register")]
public partial class StudentAttendance
{
// This class allows you to attach custom attributes to properties
// of the StudentAttendance class.
//
// For example, the following marks the Xyz property as a
// required property and specifies the format for valid values:
// [Required]
// [RegularExpression("[A-Z][A-Za-z0-9]*")]
// [StringLength(32)]
// public string Xyz { get; set; }
internal sealed class StudentAttendanceMetadata
{
// Metadata classes are not meant to be instantiated.
private StudentAttendanceMetadata()
{
}
[DisplayFormat(ApplyFormatInEditMode = true, DataFormatString = "{0:d}")]
public DateTime Date { get; set; }
[ScaffoldColumn(false)]
public long ID { get; set; }
public bool Late { get; set; }
public bool Present { get; set; }
public Student Student { get; set; }
public long StudentID { get; set; }
}
}
Member
18 Points
187 Posts
Re: Where have the Gurus gone. Please help an idiot.
Jun 14, 2013 01:12 AM|mr41971|LINK
I have extracted the relevant code for you to focus on: