Navigation properties not loading properly
问题 My context looks like: public class ApplicationDbContext: IdentityDbContext<ApplicationUser> { public ApplicationDbContext() : base("DefaultConnection") { this.Configuration.LazyLoadingEnabled = true; } //DbSet properties } so, lazy loading is enabled. I have following class: public class Home { private ICollection<Slide> _slides; [Key] [Required] public string Name { get; set; } [ForeignKey("Header")] public int? HeaderID { get; set; } //Navigation properties public ICollection<Slide> Slides