using Bootstrap.Admin.Models; using Bootstrap.DataAccess; using System.Web.Http; using System.Linq; namespace Bootstrap.Admin.Controllers { /// /// /// public class UsersController : ApiController { /// /// /// /// /// [HttpGet] public UserEntity Get([FromUri]UsersPageOption value) { var ret = new UserEntity(); ret.RetrieveUsers(value); return ret; } /// /// /// /// /// [HttpGet] public User Get(int id) { return UserHelper.RetrieveUsers().FirstOrDefault(t => t.ID == id); } /// /// /// /// [HttpPost] public bool Post([FromBody]User value) { return UserHelper.SaveUser(value); } /// /// /// /// [HttpDelete] public bool Delete([FromBody]string value) { return UserHelper.DeleteUser(value); } } }