I am trying to load a navigation property through Code First and EF 5.0 The child object is loading as null. below is the code.
[Table(\"ls_roles\")]
p
[Table("ls_roles")]
public class Role
{
[Required]
[Key]
public int RoleID { get; set; }
[Required]
public String BarColor { get; set; }
public virtual ICollection Employees { get; set; }
}
[Table("ls_ScheduleEmployee")]
public class ScheduleEmployee
{
[Key]
[Required]
public int Id { get; set; }
[Required]
[ForeignKey("Role")]
public int RoleId { get; set; }
public virtual Role Role { get; set; }
}