Ejemplo n.º 1
0
        public ActionResult Manage(Guid id)
        {
            var dto = _landlordService.GetPropertyImage(id);

            var model = new PropertyImageDetailModel(dto);

            return View("Manage", model);
        }
Ejemplo n.º 2
0
        public ActionResult Manage(PropertyImageDetailModel model)
        {
            if (ModelState.IsValid)
            {
                var dto = model.ToDto();

                var edited = _landlordService.UpdatePropertyImage(dto);

                return RedirectToAction("View", "Property", new { id = dto.PropertyId });
            }
            else
            {
                return View("Manage", model);
            }
        }