entity framework - EF CTP4 lazy loading not playing ball -


i'm using ctp4 code first ef framework, i'm having problems getting lazy loading work. reading on it, should simple, it's not

public class folder {     public int id { get; set; }     public string name { get; set; }     public int? parentfolderid { get; set; }      public virtual ilist<folder> childfolders { get; set; } } 

in model configuration:

hasmany(f => f.childfolders).withoptional().hasconstraint((child, folder) => child.parentfolderid == folder.id); 

however, when this:

folder folder = context.folders.singleordefault(f => f.id == 1); 

folder.childpages null....but should lazy loading it...

i found answer this, actually: empty constructor "folder" marked internal, , although there no hard failures, seems enough cause problems.


Comments

Popular posts from this blog

ASP.NET/SQL find the element ID and update database -

jquery - appear modal windows bottom -

c++ - Compiling static TagLib 1.6.3 libraries for Windows -