Entity Framework 6 - Attaching a graph of entities queried with AsNoTracking
问题 I am retrieving a list of entities from a table FattureFornitori , and loading also a collection owned by them (Voci, plural form - Voce, singular form) and a reference from each Voce to a TipoCosto entity: var db = new DbGestPre(); db.Configuration.ProxyCreationEnabled = false; var s = db.FattureFornitori .Include(x => x.Voci) .Include(x => x.Voci.Select(y => y.TipoCosto)) .AsNoTracking().ToList(); Now, multiple Voci within a single FattureFornitori can reference the same TipoCosto . So,