Closed SatishPaiB closed 1 year ago
I got it working with setting an environment variable conn
to my connection string.
And using the following in <database>.tt
Settings.ConnectionString = Environment.GetEnvironmentVariable("conn", EnvironmentVariableTarget.User);
Just realised I already had a wiki article on it here: wiki - ConnectionString
@sjh37 thank you very much.
Hi @sjh37 Is there any way, instead of reading the direct connection string in the database.tt, I can use user secrets to get the connection string.
instead of connnecting string, I can write code, such as extracting the value from user secerts such as what we write in startup.cs or program.cs.
It will be helpful if you give me something in asp.net 6.0.
Thank you very much.