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 Constructor
public 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. Once done, our code will be able to compile again, and we'll be free to proceed with the main dish.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.133.141.219