a guest Jan 18th, 2019 60 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. public class Student
  2. {
  3.     [Key]
  4.     public int ID {get;set;}
  5.     public string Name {get;set;}
  6.     public virtual ICollection<Class> Classes {get;set;}
  7. }
  9. public class Class
  10. {
  11. [Key]
  12. public int ID {get;set;}
  13. public Student Student {get;set;}
  14. public DateTime EnrollmentDate {get;set;}
  15. public string Name {get;set;} // this comes from the Courses data table
  16. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand