public ActionResult Edit(int id) { var item = Repository.GetItem(id); if (item == null) { return(PageNotFound()); } var model = EditEntityModelMapper.ModelFromEntity(item); return(View(model)); }
public ActionResult Create() { var model = EditEntityModelMapper.ModelFromEntity(new TEntity()); return(View("Edit", model)); }