Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,8 @@ public async Task HandleExceptionAsync(ErrorContext errorContext, Func<ErrorCont
{
// Look for DbContext classes registered in the service provider
var registeredContexts = errorContext.HttpContext.RequestServices.GetServices<DbContextOptions>()
.Select(o => o.ContextType);
.Select(o => o.ContextType)
.Distinct(); // Workaround for https://github.com/dotnet/efcore/issues/22341

if (registeredContexts.Any())
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,9 +49,9 @@ public void ConfigureServices(IServiceCollection services)
#else
options.UseSqlite(
Configuration.GetConnectionString("DefaultConnection")));
#endif

services.AddDatabaseDeveloperPageExceptionFilter();
#endif

services.AddDefaultIdentity<ApplicationUser>(options => options.SignIn.RequireConfirmedAccount = true)
.AddEntityFrameworkStores<ApplicationDbContext>();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,9 @@ public void ConfigureServices(IServiceCollection services)
#else
options.UseSqlite(
Configuration.GetConnectionString("DefaultConnection")));
#endif

services.AddDatabaseDeveloperPageExceptionFilter();
#endif

services.AddDefaultIdentity<ApplicationUser>(options => options.SignIn.RequireConfirmedAccount = true)
.AddEntityFrameworkStores<ApplicationDbContext>();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,9 @@ public void ConfigureServices(IServiceCollection services)
#else
options.UseSqlite(
Configuration.GetConnectionString("DefaultConnection")));
#endif

services.AddDatabaseDeveloperPageExceptionFilter();
#endif

services.AddDefaultIdentity<ApplicationUser>(options => options.SignIn.RequireConfirmedAccount = true)
.AddEntityFrameworkStores<ApplicationDbContext>();
Expand Down