コード例 #1
0
ファイル: MetaController.cs プロジェクト: yehuangcn/ccm
        public ActionResult Edit(Guid id)
        {
            var metaType = _metaRepository.GetById(id);

            if (metaType == null)
            {
                return(RedirectToAction("Index"));
            }

            var model = new MetaFormViewModel
            {
                MetaTypeValues        = _metaRepository.GetMetaTypeProperties(),
                MetaTypeName          = metaType.Name,
                Id                    = metaType.Id,
                SelectedMetaTypeValue = metaType.FullPropertyName
            };

            return(View(model));
        }