using Bootstrap.Admin.Models;
using Bootstrap.DataAccess;
using System.Linq;
using System.Web.Http;
namespace Bootstrap.Admin.Controllers
{
public class DictsController : ApiController
{
///
///
///
///
///
[HttpGet]
public QueryData Get([FromUri]QueryDictOption value)
{
return value.RetrieveData();
}
///
///
///
///
///
[HttpGet]
public Dict Get(int id)
{
return DictHelper.RetrieveDicts().FirstOrDefault(t => t.ID == id);
}
///
///
///
///
[HttpPost]
public bool Post([FromBody]Dict value)
{
return DictHelper.SaveDict(value);
}
///
///
///
///
[HttpDelete]
public bool Delete([FromBody]string value)
{
return DictHelper.DeleteDict(value);
}
}
}