I have
1: DbContext
2: Respository
3:Service
Service take Repository as dependency and repository take DbContext as dependency.
Problem: I have registered Repository,Service as "AddTransient" when I execute application sometimes I faced issues
"InvalidOperationException: An attempt was made to use the context while it is being configured. A DbContext instance cannot be used inside OnConfiguring since it is still being configured at this point."