예제 #1
0
        // PUT api/Shows/5
        public ShowDto Put([FromBody] ShowDto show)
        {
            var updatedShow = show.ConvertFromDto();

            ShowService.Update(updatedShow);
            return(updatedShow.ConvertToDto());
        }
예제 #2
0
        // POST api/Shows
        public ShowDto Post([FromBody] ShowDto show)
        {
            var newShow = show.ConvertFromDto();

            ShowService.Add(newShow);
            return(newShow.ConvertToDto());
        }
예제 #3
0
 // DELETE api/Shows/5
 public void Delete([FromBody] ShowDto show)
 {
     ShowService.Delete(show.ConvertFromDto());
 }