Beispiel #1
0
        public ActionResult Delete(int id)
        {
            _seriesRepository.Delete(id);
            TempData["Message"] = "Your series was successfully deleted!";

            return(RedirectToAction("Index"));
        }
Beispiel #2
0
        public ActionResult Delete(int _seriesId)
        {
            var series = _seriesRepository.GetById(_seriesId);

            _seriesRepository.Delete(series);
            return(RedirectToAction("Find"));
        }
Beispiel #3
0
        public IHttpActionResult Delete(Series series)
        {
            if (_seriesRepository.Delete(series))
            {
                return(StatusCode(HttpStatusCode.NoContent));
            }

            return(BadRequest("Series not deleted"));
        }