You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

ValuesController.cs 974B

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Threading.Tasks;
  5. using Microsoft.AspNetCore.Mvc;
  6. namespace Luticate2.Mvc.Auth.WebApiSample.Controllers
  7. {
  8. [Route("api/[controller]")]
  9. public class ValuesController : Controller
  10. {
  11. // GET api/values
  12. [HttpGet]
  13. public IEnumerable<string> Get()
  14. {
  15. return new string[] {Class1.Method1("value1"), Class1.Method1("value2")};
  16. }
  17. // GET api/values/5
  18. [HttpGet("{id}")]
  19. public string Get(int id)
  20. {
  21. return "value";
  22. }
  23. // POST api/values
  24. [HttpPost]
  25. public void Post([FromBody] string value)
  26. {
  27. }
  28. // PUT api/values/5
  29. [HttpPut("{id}")]
  30. public void Put(int id, [FromBody] string value)
  31. {
  32. }
  33. // DELETE api/values/5
  34. [HttpDelete("{id}")]
  35. public void Delete(int id)
  36. {
  37. }
  38. }
  39. }