Mid ASP.NET Core Design for testability (unit tests, integration tests)? Write loosely coupled code via DI.Mock external dependencies for unit tests.Use in-memory databases (e.g., InMemory EF Core) for integration tests.Isolate layers to enable focused testing.