예제 #1
0
        public async Task <IActionResult> DeleteShow([FromRoute] int id)
        {
            if (!ModelState.IsValid)
            {
                return(BadRequest(ModelState));
            }

            var show = await _showsService.GetById(id);

            if (show == null)
            {
                return(NotFound());
            }

            await _showsService.Delete(id);

            return(Ok());
        }
예제 #2
0
 public ActionResult <string> Delete(int showId)
 {
     return(_service.Delete(showId));
 }