Skip to content

Instantly share code, notes, and snippets.

@icebeam7

icebeam7/Student.cs

Last active Nov 27, 2019
Embed
What would you like to do?
DemoMVC: Student.cs
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