public SimpleResponse Delete(FilmCategoryDto dto)
        {
            var response = new SimpleResponse();

            try
            {
                var model = SimpleMapper.Map <FilmCategoryDto, FilmCategoryViewModel>(dto);
                response = iFilmCategoryBusiness.Delete(model);
            }
            catch (Exception ex)
            {
                response.ResponseCode    = BusinessResponseValues.InternalError;
                response.ResponseMessage = "Silme iþleminde hata oluþtu.";
                SimpleFileLogger.Instance.Error(ex);
            }

            return(response);
        }
Beispiel #2
0
        public IActionResult DeletePost(int filmId, int categoryId)
        {
            var response = iFilmCategoryBusiness.Delete(filmId, categoryId);

            if (response.ResponseCode > 0)
            {
                return(RedirectToAction("Index"));
            }
            else
            {
                ModelState.AddModelError(string.Empty, response.ResponseMessage);
                return(RedirectToAction("Delete", new { filmId, categoryId }));
            }
        }
Beispiel #3
0
        public SimpleResponse Delete(int filmId, int categoryId)
        {
            var result = iFilmCategoryBusiness.Delete(filmId, categoryId);

            return(result);
        }
        public IHttpActionResult Delete(int filmId, int categoryId)
        {
            var result = iFilmCategoryBusiness.Delete(filmId, categoryId);

            return(Json(result));
        }