Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at

  • Tate 4 posts 74 karma points
    21 days ago

    How to Add Generation Rules for Model Builder in Umbraco 12 Application?

    I need to ignore some fields while generating the models, in my Umbraco 8 application I am using IgnorePropertyType attribute from Umbraco.ModelsBuilder.

    For example:

    public partial class WebComponent 

    I need the same to implement in my Umbraco 12 application.

  • Marc Goodson 2005 posts 13175 karma points MVP 8x c-trib
    21 days ago
    Marc Goodson

    Hi Tate

    'I think' IgnorePropertyType was part of the Original Modelsbuilder project and wasn't imported into the core version when it was made part of the project?

    (I could be wrong)

    The only project I've seen for Umbraco .NET Core versions that appears to extend Modelsbuilder is Limbo Models Builder:

    This would I think give you more control over how the models are generated.



  • Tate 4 posts 74 karma points
    1 week ago

    Hi Marc,

    thanks for your response.

    I tried to use the Limbo.Umbraco.ModelsBuilder I created a separate class with the same name as the one generated and added IgnorePropertyType attribute with the field names which ones should be ignored but it doesn't work.

    I also added in the models application csproj file.

    Could you please explain me how should I config that?

    Best regards, Tate

Please Sign in or register to post replies

Write your reply to: