Learn how to mock a DbContextFactory for repository unit tests in .Net Core. Ensure access to the created DbContext, share it between the implementation and the test, and prevent the repository from disposing of the context.
Sort: