I've created a project with .NET CORE 3.1 and SQL Server database.
I have implemented a CRUD with scaffolding for my class Model "Route", but when I go to https://localhost:44381/Routes appears an arror:
An unhandled exception occurred while processing the request. InvalidOperationException: Unable to resolve service for type 'Agalber.Hostel.Backoffice.Models.Agalber_Des2Context' while attempting to activate 'Agalber.Hostel.Backoffice.Controllers.RoutesController'. Microsoft.Extensions.DependencyInjection.ActivatorUtilities.GetService(IServiceProvider sp, Type type, Type requiredBy, bool isDefaultParameterRequired).
Agalber_Des2Contextwith the DI container. Add anAddDbContext< Agalber_Des2Context>(...)call inConfigureServices. - Panagiotis Kanavos