StudentService
expects DbContext
but the container does not know how to resolve it based on your current startup.
You would need to either explicitly add the context to the service collection
Startup
services.AddScoped<DbContext, SchoolContext>();
services.AddScoped<IStudentService, StudentService>();
Or update the StudentService
constructor to explicitly expect a type the container knows how to resolve.
StudentService
public StudentService(SchoolContext context)
: base(context)
{
//...
}