Thanks Juraj for the response Yes, I meant Online forms. Essentially Im looking to do both. Re-create the old form in code using and import the data from the old online form to the newly created Form. Thats good to know about the class table. I know you can create a Page based on Class Type. which I am currently already doing to create content pages with having the parent Page Object and set custom page type fields if needed:
TreeNode newPage = TreeNode.New("Page Class Type / Name");
newPage.DocumentName = "Some Page Name";
newPage.SetValue("Summary", "some content");
newPage.Insert(ParentPage);
Im looking to do the samething but with Online Forms. I noticed in the Class Table when creating a new online form in the admin section. it will create the form and insert the class name reference in the Class Table.
Currently I have scaffolded the old Kentico Sites database in into entityframeworkcore. I can grab any data needed from the old site. I'm Just looking for a way to create new online forms within code like how you can create Tree Objects (Shown Above)
Is this what i am Looking for, To Create a new online form???
DataClassInfo newForm = new DataClassInfo();
newForm.ClassName = "Form Name";
newForm.ClassIsForm = true;
newForm.ClassFormDefinition = "";
newForm.ClassFormLayout = "";
newForm.ClassFormLayoutType = LayoutTypeEnum.Html;
DataClassInfoProvider newProvider = new DataClassInfoProvider();
// Insert or Update
newProvider.Set(newForm);
Thanks!