modelsbuilder / ModelsBuilder.Original

The Community Models Builder for Umbraco
MIT License
114 stars 49 forks source link

When generating models for IPublishedElement it adds a controller no matter what #255

Open jemayn opened 3 years ago

jemayn commented 3 years ago

Hi there!

Recently had the need to extend a BlockList model to do something extra, adding a partial class and adding the ImplementPropertyType filter worked just as expected, however the auto generated model file kept adding the constructor on each model generation creating build errors unless you removed it specifically in the generated file.

Had a look in the source code for MB and found that it doesn't check for a constructor if the extending model class isn't of type IPublishedContent.