public override IEnumerable<TemplateViewModel> TypePartEditorUpdate(ContentTypePartDefinitionBuilder builder, IUpdateModel updateModel) { if (builder.Name != "ApiPart") yield break; var settings = new ApiPartSettings { Enabled = "true" }; if (updateModel.TryUpdateModel(settings, "ApiPartSettings", null, null)) { settings.Build(builder); } yield return DefinitionTemplate(settings); }
public override IEnumerable <TemplateViewModel> TypePartEditorUpdate(ContentTypePartDefinitionBuilder builder, IUpdateModel updateModel) { if (builder.Name != "ApiPart") { yield break; } var settings = new ApiPartSettings { Enabled = "true" }; if (updateModel.TryUpdateModel(settings, "ApiPartSettings", null, null)) { settings.Build(builder); } yield return(DefinitionTemplate(settings)); }