MVC CORE 2.0.0 run c# code on every page
问题 I need to run some c# code each time any page based on _layout.cshtml is viewed. I don't want to put something in every controller.cs file, just something central like you used to have in ASP.NET's MasterPage.cs Can't get this Run a method in each request in MVC, C#? or this @Html.Action in Asp.Net Core to run, not sure if it's because they're not CORE 2.0.0, I just get a lot of compilation errors. All I want to do is be able to run some code like this public class myClass { public static