123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354 |
- using System;
- using System.Web.Http;
- using iiie.WebApiUtils.BusinessManager;
- using iiie.WebApiUtils.DBO;
- using WebAPiUtils_test.BusinessManager;
- using WebAPiUtils_test.DBO;
-
- namespace WebAPiUtils_test.Controllers
- {
- public class ValuesController : BMRHandler
- {
- [HttpGet]
- [Route("api/values/{id}")]
- public ValuesDboGet Get(int id)
- {
- return Handle(ValuesBusiness.Get(id));
- }
-
- [HttpGet]
- [Route("api/values/contains")]
- public DboGetMultiple<ValuesDboGet> Contains(string text, int page = 0, int perPage = Int32.MaxValue)
- {
- return Handle(ValuesBusiness.Contains(text, page, perPage));
- }
-
- [HttpPost]
- [Route("api/values/edit/{id}")]
- public bool Edit(long id, ValuesDboEdit obj)
- {
- return Handle(ValuesBusiness.Edit(obj, id));
- }
-
- [HttpPost]
- [Route("api/values/add")]
- public long Add(ValuesDboAdd obj)
- {
- return Handle(ValuesBusiness.Add(obj));
- }
-
- [HttpPost]
- [Route("api/values/adddbo")]
- public ValuesDboGet AddDbo(ValuesDboAdd obj)
- {
- return Handle(ValuesBusiness.AddDbo(obj));
- }
-
- [HttpPost]
- [Route("api/values/upload")]
- public string Upload()
- {
- return Handle(SaveFileToTemp().Result);
- }
- }
- }
|