// GET: api/UserStory/5 public Userstories Get(int id) { Userstories story = new Userstories(); story.userstoryid = id; return(UserStoriesRepository.SearchStory(story)); }
// DELETE: api/UserStory/5 public void Delete(int id) { Userstories user = new Userstories(); user.userstoryid = id; UserStoriesRepository.DeleteStory(user); }
public HttpResponseMessage Get(int id) { var userStories = UserStoriesRepository.GetUserStoryByID(id); HttpResponseMessage responce = Request.CreateResponse(HttpStatusCode.OK, userStories); return(responce); }
// PUT: api/UserStory/5 public void Put(int id, Userstories story) { story.userstoryid = id; UserStoriesRepository.Edit(story); }
// POST: api/UserStory public void Post(Userstories story) { UserStoriesRepository.CreateStory(story); }
// GET: api/UserStory public IEnumerable <Userstories> Get() { return(UserStoriesRepository.ShowAllStories()); }
public UserStoriesController() { repository = new UserStoriesRepository(); }