init
This commit is contained in:
25
ContosoUniversity.Models/Course.cs
Normal file
25
ContosoUniversity.Models/Course.cs
Normal file
@@ -0,0 +1,25 @@
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
|
||||
namespace ContosoUniversity.Models
|
||||
{
|
||||
public class Course
|
||||
{
|
||||
[DatabaseGenerated(DatabaseGeneratedOption.None)]
|
||||
[Display(Name = "Number")]
|
||||
public int CourseID { get; set; }
|
||||
|
||||
[StringLength(50, MinimumLength = 3)]
|
||||
public string Title { get; set; }
|
||||
|
||||
[Range(0, 5)]
|
||||
public int Credits { get; set; }
|
||||
|
||||
public int DepartmentID { get; set; }
|
||||
|
||||
public virtual Department Department { get; set; }
|
||||
public virtual ICollection<Enrollment> Enrollments { get; set; }
|
||||
public virtual ICollection<Instructor> Instructors { get; set; }
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user