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.

3m read timeFrom spin.atomicobject.com
Post cover image
Table of contents
ProblemSolutionMaking the Class

Sort: