ConfigurationManager return null when using to extract database connection string when add migration
问题 I am using Entity Framework Core in my .NET Core console app. I store my connection string in the App.config file and use ConfigurationManager in context class to access the connection string. When I want to add new migration to my project I get the following error: System.NullReferenceException: Object reference not set to an instance of an object. at EF_tut.Context.OnConfiguring(DbContextOptionsBuilder optionsBuilder) in C:\..\Context.cs:line 12 at Microsoft.EntityFrameworkCore.DbContext