Hi all.
im currently trying to add some data to a custom table using NPOCO using the docs for composers: https://our.umbraco.com/documentation/Extending/Database/
i have succesfully created my custom table using a composer/migration. and now i want to insert some data to the table from a page razor template, but i cant find any info on how to do this. i found this blog where there is examples inserting data into the npoco table: https://www.talkingdotnet.com/use-npoco-orm-with-asp-net-core/ but i was wondering if there is some built in umbraco way to get the database instead ?
npoco insert entry from frontend template
Hi all. im currently trying to add some data to a custom table using NPOCO using the docs for composers: https://our.umbraco.com/documentation/Extending/Database/ i have succesfully created my custom table using a composer/migration. and now i want to insert some data to the table from a page razor template, but i cant find any info on how to do this. i found this blog where there is examples inserting data into the npoco table: https://www.talkingdotnet.com/use-npoco-orm-with-asp-net-core/ but i was wondering if there is some built in umbraco way to get the database instead ?
Hi Christoffer,
Here is some example code for saving data to a custom table in Umbraco. It is a fairly simple config table, but should give you a starting point.
is working on a reply...