1. 为WebAPI添加 Area后,完成了CustomControllerSelector的制定。

跟踪WebAPI底层,整理WebAPI源码后发现几个问题:

1. 使用Area的controller 必须走CustomSelector的。建议。不然小问题特别多

2. 不要使用默认的Selector,最好也别用Route。

4. 用Route,必须走默认的Selector。Route 中不能与 默认Selector中路由control相同

5. 默认Selector 只认不重复的Controller 这是死理

 

2. MVC部分

Route注册的优先级:先AreaRoute -》 默认Route 

 

ModelBinder: ModelBinderDictionary.GetBinder  -》  ModelBinderProviderCollection

有时间后记

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-11-22
  • 2021-09-24
  • 2021-06-16
  • 2021-10-24
  • 2021-06-29
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-09-04
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案