你的位置: 码友网首页 / 资讯源列表 / Accessing RouteData in an ASP.NET Core Controller Constructor - Rick Strahl's Web Log

关于[Accessing RouteData in an ASP.NET Core Controller Constructor - Rick Strahl's Web Log]的摘要:

Routing in ASP.NET Core 2.2 and below is closely tied to the ASP.NET Core MVC implementation. This means that if you're trying to access RouteData outside of the context of a Controller, the RouteData on HttpContext.GetRouteData() is going to be - null. That's because until the application hits MVC processing the RouteData is not configured.

原文地址: https://weblog.west-wind.com/posts/2019/May/15/Accessing-RouteData-in-an-ASPNET-Core-Controller-Constructor

收录时间: 2019-05-17 浏览量: 2433 分类: ASP.NET Core

| 0 收藏 | 0