public ActionResult Create() { JsonForm newForm = new JsonForm(); FormCreatePageModel model = new FormCreatePageModel { ExistingForm = newForm, Modules = this.ComponentService.GetComponents <ViewModule, Entity>(newForm).ToList() }; return(this.View(model)); }
public override ActionResult Edit(int?id, string?type) { if (id is null) { throw new ArgumentNullException(nameof(id)); } JsonForm existingForm = this.FormRepository.Find(id.Value); FormCreatePageModel model = new FormCreatePageModel { ExistingForm = existingForm, Modules = this.ComponentService.GetComponents <ViewModule, Entity>(existingForm).ToList() }; return(this.View("Create", model)); }