Nibble

Archive for the 'crud' Category


UI-O-Matic + T4 Templates = Almost instant CRUD UI for your custom tables in Umbraco 5

I’ve just published a new package on Nuget that makes it even easier to generate an integrated CRUD UI for custom tables in Umbraco, as you know for UI-O-Matic you only need to create a PetaPoco poco and decorate that with some additional attibute + implement an interface for each table, if you have a lot of tables that’s really boring work mapping a table manually to a poco. So I’m happy to introduce you to the t4 templates that will do that mapping for you.

Show me

Simply install the package through nuget

PM> Install-Package Nibble.Umbraco.UIOMaticT4Templates

That will add 3 new files to your project

  • \Models\Generated\Database.tt
  • \Models\Generated\UIOMatic.Core.ttinclude
  • Models\Generated\UIOMatic.Generator.ttinclude

To now generate your pocos you’ll just have to save the Database.tt file, if no connectionstring is supplied it will use the Umbraco one, but if you point it to a different conn string (by adding it’s name) it will use that.

Example

I must note that I only modified the PetaPoco t4 templates so all credit for the excellent work in that one goes to the PetaPoco team.