init
This commit is contained in:
32
ContosoUniversity.Models/Department.cs
Normal file
32
ContosoUniversity.Models/Department.cs
Normal file
@@ -0,0 +1,32 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
|
||||
namespace ContosoUniversity.Models
|
||||
{
|
||||
public class Department
|
||||
{
|
||||
public int DepartmentID { get; set; }
|
||||
|
||||
[StringLength(50, MinimumLength = 3)]
|
||||
public string Name { get; set; }
|
||||
|
||||
[DataType(DataType.Currency)]
|
||||
[Column(TypeName = "money")]
|
||||
public decimal Budget { get; set; }
|
||||
|
||||
[DataType(DataType.Date)]
|
||||
[DisplayFormat(DataFormatString = "{0:yyyy-MM-dd}", ApplyFormatInEditMode = true)]
|
||||
[Display(Name = "Start Date")]
|
||||
public DateTime StartDate { get; set; }
|
||||
|
||||
public int? InstructorID { get; set; }
|
||||
|
||||
[Timestamp]
|
||||
public byte[] RowVersion { get; set; }
|
||||
|
||||
public virtual Instructor Administrator { get; set; }
|
||||
public virtual ICollection<Course> Courses { get; set; }
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user