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

123456789101112131415161718192021222324252627282930313233
  1. using System;
  2. using System.Web.Http;
  3. using iiie.WebApiUtils.BusinessManager;
  4. using iiie.WebApiUtils.DBO;
  5. using WebAPiUtils_test.BusinessManager;
  6. using WebAPiUtils_test.DBO;
  7. namespace WebAPiUtils_test.Controllers
  8. {
  9. public class ValuesController : ApiController
  10. {
  11. [HttpGet]
  12. [Route("api/values/{id}")]
  13. public ValuesDboGet Get(int id)
  14. {
  15. return BMRHandler<ValuesDboGet>.Handle(ValuesBusiness.Get(id), Request);
  16. }
  17. [HttpGet]
  18. [Route("api/values/contains")]
  19. public DboGetMultiple<ValuesDboGet> Contains(string text, int page = 0, int perPage = Int32.MaxValue)
  20. {
  21. return BMRHandler<DboGetMultiple<ValuesDboGet>>.Handle(ValuesBusiness.Contains(text, page, perPage), Request);
  22. }
  23. [HttpPost]
  24. [Route("api/values/edit/{id}")]
  25. public bool Edit(long id, ValuesDboEdit obj)
  26. {
  27. return BMRHandler<bool>.Handle(ValuesBusiness.Edit(obj, id), Request);
  28. }
  29. }
  30. }