我的网站在加载时崩溃,System.Reflection 中第一次调用 DbContext 时出现了一个非常长的未处理异常。
最后 2 个字段是相反的
[Table("Report_Group")]
public class Group
{
[Key, Required, Column("GroupId")]
public int Id { get; set; }
[Required, MaxLength(5)]
public string OrgCode { get; set; }
[Required, MaxLength(100)]
public string Name { get; set; }
public int TierId { get; set; }
public int? ParentGroupId { get; set; }
public int? CostCenter { get; set; }
[Required]
public int ExcludeFromAlertStats { get; set; }
[Required]
public int GroupTypeId { get; set; }
[ForeignKey("ParentGroupId")]
public virtual Group Parent { get; set; }
[ForeignKey("OrgCode")]
public virtual Organisation Organisation { get; set; }
[ForeignKey("TierId")]
public virtual Tier Tier { get; set; }
[ForeignKey("GroupTypeId")]
public virtual GroupType GroupType { get; set; }
[InverseProperty("GroupId")]
public virtual IList<GroupToUnitLink> UnitLinks { get; set; }
[InverseProperty("GroupId")]
public virtual IList<GroupToContactLink> ContactLinks { get; set; }
}
MMTTMM
相关分类