Beispiel #1
0
        public ActionResult Details(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            var category = _categoryDataProvider.GetCategoryById(id);

            if (category == null)
            {
                return(HttpNotFound());
            }
            return(View(category));
        }
Beispiel #2
0
        public ViewResult EditCategory(int id)
        {
            var category = _categoryDataProvider.GetCategoryById(id);

            var viewModel = FilmViewerMapper.Mapper.Map <EditCategoryViewModel>(category);

            return(View(viewModel));
        }