I created a project "SmartHome" using the ASP.NET MVC. I used two types of databases;
- PostgreSQL
- TIMESCALE
Here, I integrate the TIMESCALE with the PostgreSQL.
I connected the PostgreSQL with ASP.NET MVC and it is working fine. the connection string as below.
<add name="SmartHomeContext"
connectionString="Server=127.0.0.1;Port=5432;Database=smarthome;
User Id=postgres;Password=postdata;" providerName="Npgsql" />
here database names of;
- PostgreSQL = smarthome
- TIMESCALE = smarthomeData
My problem is " How TIMESCALE database connect to work with same "SmartHome" database in the ASP.NET MVC ? "
I tried the connection string for TIMESCALE as below.
<add name="SmartHomeContext"
connectionString="Server=127.0.0.1;Port=5432;Database=smarthomeData;
User Id=postgres;Password=postdata;" providerName="Npgsql" />
but it shows the below error: "The entry 'SmartHomeContext' has already been added."
Please help me or guide me, I am very new to do this.