Search code examples
umbraco7

Can I use a custom connectionstring with Ui-O-Matic so my pocos are read from different database than Umbraco?


I want to keep all my umbraco tables in the default database, but access data in another database for use with UI-O-Matic. Can I specify a custom connectionstring for my UI-O-Matic pocos?


Solution

  • According to Tim (author of UI-O-Matic) then yes:

    https://our.umbraco.com/projects/developer-tools/ui-o-matic/computer-says-no/74427-external-database

    You can put your own connectionstring in the web.config and then specify the name of it when "initializing" UI-O-Matic on a class:

    [UIOMatic("Alias", "Display Name", "Item Name", ConnectionStringName = "YourConnectionName")]