// GET: Admin/Season/Delete/5
        public ActionResult Delete(int _seriesId)
        {
            var season = _seasonRepository.GetById(_seriesId);

            _seasonRepository.Delete(season);
            return(RedirectToAction("Index", new { _seriesId = _seriesId }));
        }
Beispiel #2
0
        public IHttpActionResult Delete(Season season)
        {
            if (_seasonRepository.Delete(season))
            {
                return(StatusCode(HttpStatusCode.NoContent));
            }

            string message = $"Unable to delete Season ID {season.Id}";

            return(BadRequest(message));
        }