When do I need a IDesignTimeDbContextFactory?
When your DbContext exists in another project, like a shared library. Meaning that is has no context to run from. EF Core migrations works by actually running your code, if that is not possible, then you need to provide information about how your DbContext can be created, which you do with this factory: