I am using .Net Core 2.1 to build an application and below is my appsetting.json
file entry for the data connection. I am using an alias to connect to the database. This setting works for Microsoft .NET Framework 4.7.2 app but not for the .Net Core app.
I am using IBM.Data.DB2.Core NuGet package. If I replace myaliasname with the actual database name it connects successfully. I do not want to use the direct connection as the alias has alternate connections defined in case of failure.
"ConnectionStringOptions": {
"datasource": "Database=myaliasname;UID={0};PWD={1};Pooling=true;Min Pool Size=1;Max Pool Size=100;"
}
How can I use an alias in .Net Core app for Db2?