FromUri in ASP.NET CORE 2.0

后端 未结 2 1348
谎友^
谎友^ 2020-12-25 10:09

This question is because in my MVC project with ASP.NET CORE 2.0, I can not add the [FromUri] attribute to my drivers.

I tried using li

2条回答
  •  慢半拍i
    慢半拍i (楼主)
    2020-12-25 10:23

    I think you might be looking for [FromQuery]: https://docs.microsoft.com/en-us/aspnet/core/mvc/models/model-binding#customize-model-binding-behavior-with-attributes

    [FromUri] is used in Asp.Net WebApi 2, not asp.net core

提交回复
热议问题