EF: Create/Remove relation from Many-to-Many relations when `AutoDetectChangesEnabled` and `ProxyCreationEnabled` are disabled on DbContext
问题 Knowning Foo.Id and Bar.Id how can I create their relation without loading the entities from the DB. class Foo { public int Id { get; set; } public Lst<Bar> Bars { get; set; } } class Bar { public int Id { get; set; } public Lst<Foo> Foos { get; set; } } Also this configuration are disabled in DbContext constructor: Configuration.AutoDetectChangesEnabled = false; Configuration.ProxyCreationEnabled = false; Configuration.LazyLoadingEnabled = false; And how it is possible to remove the