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

123456789101112131415161718192021222324252627282930313233343536
  1. using System.Collections.Generic;
  2. using System.Web.Http;
  3. namespace CacheControl_test.Controllers
  4. {
  5. public class ValuesController : ApiController
  6. {
  7. // GET api/values
  8. public IEnumerable<string> Get()
  9. {
  10. return new string[] { "value1", "value2" };
  11. }
  12. // GET api/values/5
  13. [MyCacheOutput(60)]
  14. public string Get(int id)
  15. {
  16. return "value";
  17. }
  18. // POST api/values
  19. public void Post([FromBody]string value)
  20. {
  21. }
  22. // PUT api/values/5
  23. public void Put(int id, [FromBody]string value)
  24. {
  25. }
  26. // DELETE api/values/5
  27. public void Delete(int id)
  28. {
  29. }
  30. }
  31. }