C
C#2y ago
Naarfy

❔ cannot resolve AddDatabaseDeveloperPageExceptionFilter();

Hello, I'm trying to follow https://learn.microsoft.com/en-us/aspnet/core/tutorials/min-web-api?view=aspnetcore-7.0&tabs=visual-studio-mac I had an issue with the class Todo who couldn't be resolved but that was an easy fix (using TodoApi) however I have a problem with
builder.Services.AddDatabaseDeveloperPageExceptionFilter();
builder.Services.AddDatabaseDeveloperPageExceptionFilter();
Rider gives me the error
Cannot resolve symbol 'AddDatabaseDeveloperPageExceptionFilter'
Cannot resolve symbol 'AddDatabaseDeveloperPageExceptionFilter'
What am I doing wrong ? Thanks
Tutorial: Create a minimal API with ASP.NET Core
Learn how to build a minimal API with ASP.NET Core.
2 Replies
cap5lut
cap5lut2y ago
AddDatabaseDeveloperPageExceptionFilter comes from the DatabaseDeveloperPageExceptionFilterServiceExtensions class, so if u "import" the namespace Microsoft.Extensions.DependencyInjection the method should become available
Accord
Accord2y ago
Was this issue resolved? If so, run /close - otherwise I will mark this as stale and this post will be archived until there is new activity.
Want results from more Discord servers?
Add your server