Upgrading the BaseApiController

Here's the new source code with the new DI-injected instances (new/updated lines are highlighted):

using System;using Microsoft.AspNetCore.Mvc;using Newtonsoft.Json;using System.Collections.Generic;using System.Linq;using TestMakerFreeWebApp.Data;using Mapster;using Microsoft.AspNetCore.Identity;using Microsoft.Extensions.Configuration;namespace TestMakerFreeWebApp.Controllers{    [Route("api/[controller]")]    public class BaseApiController : Controller    {        #region Constructor        public BaseApiController(            ApplicationDbContext context,            RoleManager<IdentityRole> roleManager,            UserManager<ApplicationUser> userManager,            IConfiguration configuration            )        {            // Instantiate the required classes through DI            DbContext = context; RoleManager ...

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.