You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/usage/extensibility/repositories.md
+20-47
Original file line number
Diff line number
Diff line change
@@ -45,62 +45,35 @@ public class ArticleRepository : EntityFrameworkCoreRepository<Article>
45
45
46
46
## Multiple DbContexts
47
47
48
-
If you need to use multiple Entity Framework Core DbContexts, first add each DbContext to the ResourceGraphBuilder.
49
-
50
-
Then, create an implementation of IDbContextResolver for each context.
51
-
52
-
Register each of the new IDbContextResolver implementations in Startup.cs.
53
-
54
-
You can then create a general repository for each context and inject it per resource type. This example shows a single DbContextARepository for all entities that are members of DbContextA.
55
-
56
-
Then inject the repository for the correct entity, in this case Foo is a member of DbContextA.
48
+
If you need to use multiple Entity Framework Core DbContexts, first create a repository for each context and inject its typed resolver.
49
+
This example shows a single `DbContextARepository` for all entities that are members of `DbContextA`.
0 commit comments