public ActionResult Delete(int number)
        {
            Landmark landmark = _landmarkService.GetLandmarkByNumber(number);

            if (landmark == null)
            {
                return(HttpNotFound());
            }
            LandmarkViewModel model = Mapper.Map <Landmark, LandmarkViewModel>(landmark);

            return(View(model));
        }
Esempio n. 2
0
        public ActionResult Details(int number)
        {
            var landmark = Mapper.Map <Landmark, LandmarkViewModel>(
                _landmarkService.GetLandmarkByNumber(number));

            landmark.Comments = _commentService
                                .GetCommentsByLandmarkId(landmark.LandmarkId)
                                .ToList();

            ViewBag.Pictures = RenderPicture(landmark);
            return(View(landmark));
        }