I'm trying to load something from the database in visual studio, which works. However, the object I'm getting has some variables that are null:
I'm loading an instance of class 'ClauseComponent'. This object has 2 properties of type 'ClauseComponent'. These 2 properties are null.
Screenshot:

Code from the repository:
Grade gr = grades.Include(l => l.DeterminateTableProp.ClauseComponent)
.FirstOrDefault(g => g.GradeId == gradeId);
Code from the ClauseComponent mapper:
public ClauseComponentsMapper()
{
ToTable("ClauseComponents");
// Primary key
HasKey(c => c.ClauseComponentId);
// Properties
Property(c => c.ClauseComponentId)
.HasDatabaseGeneratedOption(DatabaseGeneratedOption.Identity);
}
Code from the Clause class (that is inheriting from the ClauseComponent class):
public virtual ClauseComponent YesClause { get; set; }
public virtual ClauseComponent NoClause { get; set; }
public String Name { get; private set; }
public virtual Parameter Par1 { get; set; }
public virtual Parameter Par2 { get; set; }
public int Waarde;
public Clause(String name, Parameter par1, int waarde)
{
this.Name = name;
this.Par1 = par1;
this.Waarde = waarde;
}
public Clause(String name, Parameter par1, Parameter par2)
{
this.Name = name;
this.Par1 = par1;
this.Par2 = par2;
}
public Clause()
{
}
What is causing this?