Ejemplo n.º 1
0
        public IActionResult VideoDelete(int VideoId)
        {
            var entity = _videoServices.GetById(VideoId);

            _videoServices.Delete(entity);
            return(RedirectToAction("VideoList"));
        }
        public JsonResult Delete(int id)
        {
            // Video vCategory = _videoRepository.GetById(id);

            _videoServices.Delete(id);
            AR.SetSuccess(String.Format(Messages.AlertDeleteSuccess, EntityNames.Video));
            return(Json(AR, JsonRequestBehavior.DenyGet));
        }
Ejemplo n.º 3
0
        public IActionResult VideoDeleteAdmin(int VideoId)
        {
            var entity = _videoServices.GetById(VideoId);

            _videoServices.Delete(entity);
            var name = entity.Tittle;

            TempData.Put("message", new AlertMessage()
            {
                Title     = "Video Silme",
                Message   = $"{name} Video Başarıyla Silindi",
                AlertType = "danger"
            });
            return(RedirectToAction("VideoListAdmin"));
        }