Everleap successfully renewed our Microsoft Silver Partner status for 2020-2021 – this time with 2 Competencies: Silver Datacenter Solutions competency and the Silver Cloud Hosting Platform Hosting competency.
Even with the Stay at Home order due to the COVID-19 virus pandemic, we’re still hard at work here at Everleap.
I haven’t had much time to personally explore development in .NET Core until recently now that I’m staying put. I started about a week ago, ran through a couple of Microsoft tutorials, and delved right into it. Immediately, I ran into a roadblock with the connection string because .NET Core doesn’t really make use of the web.config file which I’m used to in .NET Framework. So, something as simple as assigning a connection string to a string using System.Configuration proved difficult.
private static
string connectionString = ConfigurationManager.AppSettings["ConnectionString"];
That’s because .NET Core allows you to pull configuration information from a variety of sources. After researching the matter further on the web and looking at various solutions involving dependency injection and Microsoft.Extensions.Configuration, I couldn’t really find a working solution for what I wanted to do – which was to simply reference it in a class library project apart from the main project (in other words, I couldn’t get the code to work properly in a manner that I am used to), so I developed one of my own solution and am sharing it with you in this post.