using Bootstrap.Admin.Models; using Bootstrap.DataAccess; using System.Linq; using System.Web.Http; namespace Bootstrap.Admin.Controllers { public class MenusController : ApiController { /// /// /// /// /// [HttpGet] public QueryData Get([FromUri]QueryMenuOption value) { return value.RetrieveData(); } /// /// /// /// /// [HttpGet] public Menu Get(int id) { return MenuHelper.RetrieveMenus().FirstOrDefault(t => t.ID == id); } /// /// /// /// [HttpPost] public bool Post([FromBody]Menu value) { return MenuHelper.SaveMenu(value); } /// /// /// /// [HttpDelete] public bool Delete([FromBody]string value) { return MenuHelper.DeleteMenu(value); } } }