using Bootstrap.Admin.Models;
using Bootstrap.DataAccess;
using System.Linq;
using System.Web.Http;
namespace Bootstrap.Admin.Controllers
{
public class GroupsController : ApiController
{
///
///
///
///
///
[HttpGet]
public QueryData Get([FromUri]QueryGroupOption value)
{
return value.RetrieveData();
}
///
///
///
///
///
[HttpGet]
public Group Get(int id)
{
return GroupHelper.RetrieveGroups().FirstOrDefault(t => t.ID == id);
}
///
///
///
///
[HttpPost]
public bool Post([FromBody]Group value)
{
return GroupHelper.SaveGroup(value);
}
///
///
///
///
[HttpDelete]
public bool Delete([FromBody]string value)
{
return GroupHelper.DeleteGroup(value);
}
}
}