c# - How to have custom API URLs in Web API 4 for .NET 4 -


in .net 4.5, can add route decorator define route api call so:

    [httpget]     [route("libraries/{libraryid}/books/{bookid}/checkout")]     public ihttpactionresult checkoutbook(long libraryid, long bookid,                                     [fromuri] long utctimestamp)     {     } 

however, in webapi .net 4, don't have access route decorator. how define custom routes specific api calls?

attribute routing nuget package before being integrated framework:

attributerouting.webapi nuget


Comments

Popular posts from this blog

javascript - RequestAnimationFrame not working when exiting fullscreen switching space on Safari -

Python ctypes access violation with const pointer arguments -