Umbraco doesn't currently, and I don't believe does in v9, support Code First models.
Models Builder generates models from your Umbraco Document Types which you can then extend, however these extensions do not show in the Umbraco back office.
The Umbraco back office deals with IContent items, where as front end rendering and Models Builder deals with IPublishedContent.
Code First Models
Hi,
I am new to Umbraco 9 and am trying to find how I can have my own partial class models show up in backoffice?
My appSetting.json has the following but have tested the other options to see if my document type will show up.
"ModelsBuilder": { "ModelsMode": "SourceCodeManual", "Enable": true
As a test I created the below:
{ [PublishedModel("sitePage")] public partial class SitePage : PublishedContentModel { private IPublishedValueFallback _publishedValueFallback;
I did check the dll and the class is available.
I found this: https://our.umbraco.com/Documentation/Reference/Templating/Modelsbuilder/Builder-Modes and it leads me to believe that if I have the full version of model builder it should work. That being said am I on the right track that this is what I need and is there a model builder full version available for Umbraco 9 beta 3?
Hi Marek,
Umbraco doesn't currently, and I don't believe does in v9, support Code First models.
Models Builder generates models from your Umbraco Document Types which you can then extend, however these extensions do not show in the Umbraco back office.
The Umbraco back office deals with IContent items, where as front end rendering and Models Builder deals with IPublishedContent.
Thanks
Nik
Ah k makes sense, thank you man.
is working on a reply...