کتابخانه Hyprlinkr
نویسنده: وحید محمدطاهری
تاریخ: ۱۳۹۵/۰۸/۲۸ ۱۹:۳۱
آدرس: www.dntips.ir
| مطالب | ۳۶۹۴ |
| نویسندگان | ۲۷۶ |
| گروههای مطالب | ۱۰۲۴ |
| نقشههای راه | ۱۱۹ |
| دورهها | ۱۴ |
| اشتراکها | ۱۷۹۱۴ |
Imagine that you're using the standard route configuration created by the Visual Studio project template:
name: "API Default",
routeTemplate: "api/{controller}/{id}",
defaults: new { id = RouteParameter.Optional } In that case, you can create an URI to a the resource handled by the FooController.GetById Action Method like this:
var uri = linker.GetUri<FooController>(r => r.GetById(1337));
This will create a URI like this:
http://localhost/api/foo/1337