The following comes from web.config of an old asp.net Web Forms project. How do I add this to asp.net core 2? And then how I have accessed as I did before. Since "configurationManager" no longer exists in Core 2, how do I access it? I have an example of the old way I did it before below.
<connectionStrings><add name="strConnection" connectionString="Data Source=localhost;initial catalog=TestCatalogue;password=TestPassword;persist security info=True;user id=TestUser;packet size=4096" providerName="System.Data.SqlClient" />
And now, the way I accessed it before.
public static string strConnection;
strConnection = ConfigurationManager.ConnectionStrings["strConnection"].ConnectionString;