Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // api/Custom/SayHello
- [HttpGet]
- public async Task<string> SayHello()
- {
- return await Task.FromResult("Hello World Async").ConfigureAwait(false);
- }
- // api/Custom/SayFloat
- [HttpGet]
- public async Task<float> SayFloat()
- {
- return await Task.FromResult(1000.0f).ConfigureAwait(false);
- }
- config.Routes.MapHttpRoute("DefaultApiWithId",
- "Api/{controller}/{id}",
- new { id = RouteParameter.Optional });
- /* ----- this is trying to match my utility controller and its actions ----- */
- config.Routes.MapHttpRoute(
- name: "ActionApi",
- routeTemplate: "Api/{controller}/{action}"
- );
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement