twitter.bootstrap.mvc
twitter.bootstrap.mvc copied to clipboard
Support for ScaffoldColumn Attribute
Bootstrap default templates ignore ScaffoldColumn() annotations. In my project I've corrected this by updating the VisibleProperties() extension methods with an additional where clause:
.Where(info => info.GetCustomAttribute<System.ComponentModel.DataAnnotations.ScaffoldColumnAttribute>(false)==null || info.GetCustomAttribute<System.ComponentModel.DataAnnotations.ScaffoldColumnAttribute>(false).Scaffold)
Good point. The net data annotation [Display(AutoGenerate=false)]
is not supported by the bootstrap shared views yet (#83), but should be. I guess [Display(AutoGenerate=false)]
should be checked too when generating the template, in addition to the check you mention above.
Please note that I have pull request #29 open with significant changes to the templates; consider adding your changes on top of that.