entity framework 4 - EF Code first doesn't load my collection of child objects -
i have 2 objects:
public class program { [key] [databasegenerated(databasegeneratedoption.identity)] public long id { get; set; } public string name { get; set; } public virtual icollection<videofile> files { get; set; } } public class videofile { [key] [databasegenerated(databasegeneratedoption.identity)] public long id { get; set; } [required] public string path { get; set; } [required] public virtual program program { get; set; } }
the 2 tables correctly created in database, when save program insert files childs too, when tried program file collection come nulls, have lazyload enable, , default entity framework return empty collection when child collection empty why have null?
Comments
Post a Comment