Skip to content

Instantly share code, notes, and snippets.

@nishanc
Created May 4, 2021 12:03
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 nishanc/49116c4722192741fd81f7cc7b458555 to your computer and use it in GitHub Desktop.
Save nishanc/49116c4722192741fd81f7cc7b458555 to your computer and use it in GitHub Desktop.
using System.ComponentModel.DataAnnotations;
public abstract class TPCUser
{
[Key]
public int Id { get; set; }
[Required]
public string Username { get; set; }
[Required]
public string Email { get; set; }
}
public class TPCTeacher : TPCUser
{
public string Designation { get; set; }
public string Speciality { get; set; }
}
public class TPCStudent : TPCUser
{
public string CGPA { get; set; }
public string Major { get; set; }
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment