Generates typed models for document types automatically. No templates, no buttons, no hassle, they're just there.
Generated classes are partial and all virtual for painless extension.
Typed model generator and "code-first" parser for Umbraco. Synchronizes C# classes with uSync DocumentType files.
License: MIT License
Memory matters...
I am getting the following error when using AutoFac, clicking in the Developer section in the CMS. I am using Umbraco v7.1.4, and installing the module by running the Packaging proejct in the V7.1 branch of CodeGen.
Failed to retrieve data for application tree developer
at Umbraco.Web.Trees.ApplicationTreeExtensions.d__4.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Umbraco.Web.Trees.ApplicationTreeController.d__12.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Umbraco.Web.Trees.ApplicationTreeController.d__4.MoveNext()
@peteduncan says
Finally not sure if this is in or not, but if you want to go the whole "less key strokes" route then you could get the doctype alias/name from the class name so:
class ProductVariant {}
would have a name of "Product Variant" and an alias of "productVariant" assuming no attributes where added/included. You can of course override these with attributes if you like.
Has some issues with generating XML. Could pick it up from the alias passed to GetPropertyValue<>, but will be cumbersome, and possibly not at all necessary. Mostly nice-to-have.
It doesn't appear that CodeGen picks up models built into a dll that can be deployed to the site. Looking at the code, it doesn't appear to be doing any reflection for those types. Is there any particular reason for this?
Excellent package!
Does the current NuGet version support Composition properties from Umbraco 7.2+?
I see that there is a Compositions section in the def.config file which properly lists any selected DocTypes, but none of their properties appear in the Model except for the Master DocType (if any).
Not sure if this is a bug, missing feature, or an incorrect implementation on my end.
Thank you!
Expected behaviour to put using statements first in generated class file
Backoffice: when using "Codegen preview class" on Document type, on the right side there is nothing.
Need to add the line
ns.Imports.Add(new CodeNamespaceImport("Umbraco.Web"));
to the StandardImportsBuilder class so that the necessary using statement is included to support the GetPropertyValue<T> extension is supported.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.