Пример #1
0
        public ActionResult Edit(int?id)
        {
            var model = new EstateModel
            {
                ReleaseDate = DateTime.Today.ToShortDateString()
            };

            if (id != null)
            {
                var estateDto = _estateService.Get(id.Value);
                model = Mapper.Map <EstateModel>(estateDto);
            }

            return(View(model));
        }