❔ Dependency injection fails-Value cannot be null

Kinda straightforward , here is the code:
    public override void ConfigureServices(ServiceConfigurationContext context)
    {
        context.Services.AddSingleton<LessonParametersService>();

        Configure<AbpAutoMapperOptions>(options =>
        {
            options.AddMaps<lingumindApplicationModule>();
        });
        getResults(context);


    }

    private void getResults(ServiceConfigurationContext context)
    {
        var lessonParametersService = context.Services.GetRequiredService<LessonParametersService>();
        var result = lessonParametersService.getResult().GetAwaiter().GetResult();
    }

Any ideas?
Was this page helpful?