问: ASP.NET CORE MVC 如何在Filter中使用依赖注入来读取AppSettings 答: Dependency injection is possible in filters as well. Here is a simple way to get connection string public class EBisUserAuthResourceFilter : Attribute, IResourceFilter { private readonly string co…