Advertisement
Guest User

Untitled

a guest
Jul 18th, 2019
62
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.83 KB | None | 0 0
  1. [ApiVersion("1.0")]
  2. [Route("api/v{api-version:apiVersion}/Tests")]
  3. [ApiController][AllowAnonymous]
  4. public class TestsController : ControllerBase
  5. {
  6.  
  7. public TestsController()
  8. {
  9. }
  10.  
  11. /// <summary>
  12. /// Get actions
  13. /// </summary>
  14. [HttpGet]
  15. public async Task<IActionResult> GetActions()
  16. {
  17. var idDemo = 1;
  18.  
  19. //TODO
  20. urls.Add("Get Call methode full url with parameter : idDemo ");
  21. urls.Add("Get Something methode full url with parameter : idDemo ");
  22. return Ok(urls);
  23. }
  24.  
  25. [HttpPost("call/{id}")]
  26. public async Task<IActionResult> Call(int id)
  27. {
  28. return Ok();
  29. }
  30.  
  31. /// <summary>
  32. /// do something
  33. /// </summary>
  34. [HttpPost("do/it/{id}")]
  35. public async Task<IActionResult> Something(int id)
  36. {
  37. return Ok();
  38. }
  39.  
  40. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement