Last active
November 27, 2019 13:33
-
-
Save icebeam7/2f3293aee97e1b1ee16e7cae7f012dbe to your computer and use it in GitHub Desktop.
DemoMVC: Student.cs
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.ComponentModel.DataAnnotations; | |
using System.ComponentModel.DataAnnotations.Schema; | |
namespace DemoMVC.Models | |
{ | |
public class Student | |
{ | |
[Key] | |
[DatabaseGenerated(DatabaseGeneratedOption.Identity)] | |
public int Id { get; set; } | |
public string Name { get; set; } | |
public int Age { get; set; } | |
[Display(Name = "Enroll Date")] | |
public DateTime EnrollDate { get; set; } | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment