I'm using Sitecore 9.1.1.
I have created a local custom database that have some tables with some records on SQL server.
I need to programmatically insert and retrieve some records from this database on some triggered action.
However, I'm not sure where I should define the connectionstring for this database.
I tried adding the connection string to the App_Config/connectionstrings.config
file as below.
In my code I tried accessing my new database as follows:
var customdb = Sitecore.Configuration.Factory.GetDatabase("CustomDB");
However this gave me the below error
{"Could not find configuration node: databases/database[@id='CustomDB']"}
I'm not sure if I should define my database and its connectionstring somewhere else or should I try connecting to my custom database using EF?