Questo articolo lo avevo già letto... (Ma si riferisce anche alla versione 4.0)
Ma non continuo ancora a capire che cosa devo far per caricare solo le SubCategory_Product senza farli caricare anche i Products associati...
Questo è il codice che eseguo, e sia:codice:var subCatObj = (from SubCategory_Product t in contextDB.SubCategory_Products where t.IDSubCategory == prodoctsDB.SubCategory select t).SingleOrDefault();
contextDB.Configuration.LazyLoadingEnabled = false;
che
contextDB.Configuration.LazyLoadingEnabled = true;
Non mi cambia niente...

Rispondi quotando