Base solution for your next web application
Open Closed

Access ConnectionString or SqlConnection inside an AppServic #1577


User avatar
0
eu11111 created

Hey. I am trying to run a bulk insert inside the database. My problem is that I need to us a SqlConnection to do so, inside an AppService. Should I use the Core layer instead?

Anyway, is there a way of accessing th ConnectionString from appsettings.json inside the Web project from another project? Or getting a SqlConnection object from the dbContext or something related?

Thanks in advance


1 Answer(s)