Reflecting the upgrade on the affected controllers

Needless to say, these changes to the BaseApiController will break all the derived controllers; in order to fix that, replace their constructor in the following way (new/changed lines are highlighted):

[...]#region Constructorpublic QuizController(    ApplicationDbContext context,    RoleManager<IdentityRole> roleManager,    UserManager<ApplicationUser> userManager,    IConfiguration configuration    )    : base(context, roleManager, userManager, configuration) { }#endregion[...]

These changes are valid for the QuizController class; the same exact code will also fix the AnswerController, QuestionController, and ResultController code, as long as we remember to change the controller name in the constructor. ...

Get ASP.NET Core 2 and Angular 5 now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.