c# - Is there a way to build a lazyload path from one table to another? -


i have 2 class ef code first site , can use lazyloding go class section_translation class section (i.e. section_translations.section.xxxx) can not go section section_translation (i.e. section.section_translation.xxxx) , not sure need allow me travel section section_translation.

section.cs

using ffinfo.dal.generaltranslationtables; using system; using system.collections.generic; using system.componentmodel.dataannotations; using system.componentmodel.dataannotations.schema;  namespace ffinfo.dal.generaltables {     [table("section")]     public class section     {         [key, required, databasegenerated(databasegeneratedoption.identity)]         public int16 sectionid { get; set; }          public int64? logofileid { get; set; }          [required, maxlength(15), column(typename = "varchar")]         public string routename { get; set; }          [required, maxlength(15), column(typename = "varchar")]         public string sectiontype { get; set; }          public virtual ilist<section_translation> sectiontranslations { get; set; }          [foreignkey("logofileid")]         public virtual file file { get; set; }     } } 

section_translation.cs

using ffinfo.dal.generaltables; using system; using system.componentmodel.dataannotations; using system.componentmodel.dataannotations.schema;  namespace ffinfo.dal.generaltranslationtables {     [table("sectiontranslation")]     public class section_translation     {         [key, required, column(order = 0)]         public int16 sectionid { get; set; }          [key, required, column(order = 1)]         public byte culturecodeid { get; set; }          [required]         public string sectiontitle { get; set; }          public string synopsis { get; set; }          [foreignkey("sectionid")]         public virtual section section { get; set; }          [foreignkey("cultureid")]         public virtual culturecode culture { get; set; }     } } 

talking co-worker appears ef not allow building of lazy loading want to.


Comments