If my base class has something like:
using System.Web.Mvc;
using System.Web.Routing;
using MFA.Storage.Helpers;
using MFA.Storage.Models;
using MFA.WebUx.Areas.Administration.ViewModels.Notes;
using MFA.WebUx.Areas.Administration.Services.Notes;
using MFA.WebUx.Areas.Administration.ActionFilters
using System;
Then in my child classes that inherit from the base controller do I still need to add all the using directives? Is that a good or bad practice?
usingdirectives do not “inherit” (their scope is confined to the file in which they are declared), so you will need to add them to the descendant class as well, unless both classes reside in the same file.From a best practice perspective, it’s probably better to keep each class in it’s own file, and add
usingdirectives to each class file as needed.