I have two table Student and class many to many relationship
Student Table but i dont know how to represent Classroom_Student class in code .
- Student Class
- namespace UniversityData.Models
- {
- [Table("Student")]
- public partial class Student
- {
- public Student()
- {
- this.Classes = new HashSet();
- }
- [DatabaseGenerated(DatabaseGeneratedOption.None)]
- [Key]
- public int StudentID { get; set; }
- [Required]
- [StringLength(50)]
- public String StudentName { get; set; }
- public ICollection Classes { get; set; }
- }
- }
- ClassRoom Table
- namespace UniversityData.Models
- {
- [Table("Class")]
- public partial class Class
- {
- public Class()
- {
- this.Students = new HashSet();
- }
- [Key]
- public int ClassID { get; set; }
- [Required]
- [StringLength(50)]
- public string ClassName { get; set; }
- public ICollection Students {get; set;}
- }
- }
Classroom_Student
- StudID
ClassID
starttime
endtime
day
What i do as following
Create class for Student Table and class for ClassRoom Table
but Classroom_Student Table cannot do class for him
how to do class for Classroom_Student Table .

ahmed salahRank #2,612 · 534 reputationPosted Nov 15, 2016, 3:11 PM EST
ahmed salahRank #2,612 · 534 reputationPosted Nov 15, 2016, 3:16 PM EST
Nitin SontakkeRank #264 · 9.6K reputationPosted Nov 15, 2016, 6:47 PM EST
Nitin SontakkeRank #264 · 9.6K reputationPosted Nov 15, 2016, 6:51 PM EST
ahmed salahRank #2,612 · 534 reputationPosted Nov 16, 2016, 1:16 AM EST
Nitin SontakkeRank #264 · 9.6K reputationPosted Nov 16, 2016, 1:30 AM EST
Nitin SontakkeRank #264 · 9.6K reputationPosted Nov 16, 2016, 1:33 AM EST
ahmed salahRank #2,612 · 534 reputationPosted Nov 16, 2016, 1:38 AM EST
Nitin SontakkeRank #264 · 9.6K reputationPosted Nov 16, 2016, 6:47 AM EST