PageRenderTime 41ms CodeModel.GetById 13ms RepoModel.GetById 1ms app.codeStats 0ms

/MvcApplicationAPI/Controllers/ValuesController.cs

https://github.com/henrikjakobsen/WebAPI
C# | 39 lines | 29 code | 5 blank | 5 comment | 0 complexity | db907a1ec80718caffe432057724a791 MD5 | raw file
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Net;
  5. using System.Net.Http;
  6. using System.Web.Http;
  7. namespace MvcApplicationAPI.Controllers
  8. {
  9. public class ValuesController : ApiController
  10. {
  11. // GET api/values
  12. public IQueryable<string> Get()
  13. {
  14. return new string[] { "value1", "value2" }.AsQueryable();
  15. }
  16. // GET api/values/5
  17. public string Get(int id)
  18. {
  19. return "value";
  20. }
  21. // POST api/values
  22. public void Post([FromBody]string value)
  23. {
  24. }
  25. // PUT api/values/5
  26. public void Put(int id, [FromBody]string value)
  27. {
  28. }
  29. // DELETE api/values/5
  30. public void Delete(int id)
  31. {
  32. }
  33. }
  34. }