- First, let's create a new views folder named ViewsOld. In this folder, we will copy _ViewImports.cshtml and _ViewSart/cshtml from the Views folder, and cut the Product views folder to paste it into the ViewsOld folder:
- Next, we create a folder named Infrastructure and create a C# class named OldViewsExpander.cs. This class will contain the following code:
public class OldViewsExpander : IViewLocationExpander{ public IEnumerable<string> ExpandViewLocations (ViewLocationExpanderContext context, IEnumerable<string> viewLocations) { // rerturn all classic locations foreach (string location in viewLocations) { yield return location; ...