In my asp.net core service, I have this in the startup...services.AddDbContext<Mydb_Context>(
options => options.UseSqlServer(Configuration["Settings:ConnString"]));
...and to make it works, I created also this snippet:...public Mydb_Context(DbContext...