Copied to clipboard

Flag this post as spam?

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


  • james 37 posts 121 karma points c-trib
    Jan 08, 2018 @ 17:26
    james
    0

    Models Builder - ImplementPropertyType outside of Models folder

    Hello,

    I need to override a property on one of my classes generated by models builder using the AppData mode. I've created a partial class and I'm using the ImplementPropertyType attribute on the property I want to override.

    The solution that I'm working on has the models builder generated classes and partial classes in separate folders (the namespaces are the same). I'm finding that the attribute is ignored when the partial class is in the Partials folder, but it works if I move the partial class to the folder with the generated classes. Is this intended behaviour, and is there any way to override it so that I can keep my partial classes in their Partials folder?

    As an aside, I'm doing this to get models builder working with Vorto. It looks like I've either got to use the ImplementPropertyType attribute on each property that I want to override as above or implement a custom model factory. Has anyone got any other suggestions for getting the two to place nicely?

  • Chris Houston 535 posts 980 karma points MVP admin c-trib
    Nov 01, 2018 @ 16:25
    Chris Houston
    0

    I know this is an old forum post, but I thought it might help that Matt has been looking into better Models Builder support built into Vorto:

    https://github.com/umco/umbraco-vorto/commit/93769adb71b8d63bf2c0296972b62d88dc19f7f0

    I am guessing this might not be relevant going forward when V8 has been fully released with multi-lingual support built in, but it might be useful for anyone using V7 + Vorto now.

Please Sign in or register to post replies

Write your reply to:

Draft