c# - EF Include() between contexts? -
i have 2 extended instances of dbcontext use in code-first solution. 1 ever read maps existing set of tables demographic purposes. other context mapped local working set of tables.
i have created view , mapped own entity included navigational property in poco model representing entity that's mapped other context. question is: can use include fetch related entities across contexts? far doesn't appear complains it's looking view under wrong schema - 1 used other context - though view has correct schema defined in mapping.
i'm using ef 6 mvc 4.
each context runs in complete isolation , cannot share objects 1 context other. if pull objects database in notracking mode, moment associate objects in other context assigning them navigation properties pulling them other context don't want.
if have readonly context of kind can fill in foreign keys ids in read/write context.
Comments
Post a Comment