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 911B

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