Пример #1
0
        public ActionResult Edit(int id)
        {
            var item = Repository.GetItem(id);

            if (item == null)
            {
                return(PageNotFound());
            }

            var model = EditEntityModelMapper.ModelFromEntity(item);

            return(View(model));
        }
Пример #2
0
        public ActionResult Create()
        {
            var model = EditEntityModelMapper.ModelFromEntity(new TEntity());

            return(View("Edit", model));
        }