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)); }