Skip to content

Instantly share code, notes, and snippets.

@nareshjois
Created December 10, 2013 19:46
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save nareshjois/7896928 to your computer and use it in GitHub Desktop.
Save nareshjois/7896928 to your computer and use it in GitHub Desktop.
namespace TestApplication
{
[ScaffoldTable(true)]
[MetadataType(typeof(Attributes.Project))]
public partial class Project
{
}
[ScaffoldTable(true)]
[MetadataType(typeof(Attributes.Task))]
public partial class Task
{
}
namespace Attributes
{
public partial class Project
{
[Required]
[StringLength(50, MinimumLength = 5)]
[Display(Name = "Project Name")]
public string ProjectName { get; set; }
}
public partial class Task
{
[Required]
[Display(Name = "Project", Order = 0)]
public Project Project { get; set; }
[Required]
[Display(Name = "Employee Code", Order = 1, GroupName = "Employee")]
public string EmployeeCode { get; set; }
[Required]
[Display(Name = "Track Date", Order = 2, GroupName = "Date & Time")]
public DateTime TrackDate { get; set; }
[Required]
[Display(Name = "Hours", Order = 3, GroupName = "Date & Time")]
public decimal TaskHours { get; set; }
[Required]
[Display(Name = "Task Descriprion", Order = 4, GroupName = "Information")]
public string TaskDescriprion { get; set; }
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment