EntityFramework 6.1自动生成的类:
- public partial class STUDENT
- {
- public STUDENT()
- {
- this.STUDENT_GROUPS = new HashSet<STUDENT_GROUPS>();
- }
- public int ID { get; set; }
- public int PERSON { get; set; }
- ...
- public virtual ICollection<STUDENT_GROUPS> STUDENT_GROUPS { get; set; }
- ...
- }
和STUDENT_GROUPS:
- public partial class STUDENT_GROUPS
- {
- public int ID { get; set; }
- public int GROUPS_GRP { get; set; }
- public int STUDENT { get; set; }
- public virtual STUDENT STUDENT1 { get; set; }
- public virtual GROUPS_GRP GROUPS_GRP1 { get; set; }
- }
抛出CA2214:不要在构造函数中调用可覆盖的方法,但由于这是一个自动生成的代码,我想我不应该改变它,我应该如何处理这种情况?
提前致谢