public void DeleteSerie(int id) { var serverData = SerieRepository.Get(id); if (serverData == null) { throw new HttpResponseException(HttpStatusCode.NotFound); } SerieRepository.Delete(id); }
//[ValidateAntiForgeryToken] public JsonResult Delete(int id) { var delete = serieRepository.Delete(id); if (!delete) { return(Json(new { message = $"", success = false })); } return(Json(new { message = $"Série com o ID {id} excluida com sucesso", success = true })); }
public void RemoveFavorite(Serie serie) { _serieRepository.Delete(serie); }