A preview of a code generator that generates repository model code for Kentico Online Forms using the System.ComponentModel.DataAnnotations attributes. Such model is supposed to be passed into the repository which in turn passes the form data to the class generated by the standard Code tab in the Forms application. The DataAnnotation attributes allow for leveraging of the existing rich ASP.NET MVC 5 validation infrastructure while preserving full control over HTML with standard display templates and/or partial views.
The generator also creates the partial view code using Razor.
The repository accompanies the DevNet article Render Online Forms with ASP.NET MVC Display Templates and The Code Generator—Part 2
-
Read the contribution guidelines
-
Enable the continuous integration module
-
Serialize all objects to disk
-
Open a command prompt
-
Navigate to the root of your project (where the .sln file is)
-
Fork this repo
-
Init a git repo and fetch the web part
git init git remote add origin https://github.com/owner/MvcCodeGenerator.git git fetch git checkout -t origin/master
-
Restore DB data
Kentico\CMS\bin\ContinuousIntegration.exe -r
-
Make changes
-
Use combination of
git add
,git commit
andgit push
to transfer your changes to GitHubgit status git commit -a -m "Fixed XY" git push
-
Submit a pull request
- Kentico 10
- Microsoft .NET Framework 4.5+
- Visual Studio 2015 Update 1+
Note: The source code files for Kentico 9 can be downloaded from the article mentioned above.