Quantcast
Channel: ASP.NET Core
Viewing all articles
Browse latest Browse all 9386

How to get httpcontext from dbcontext

$
0
0

In controller,

  private readonly ApplicationDbContext _dbContext;

        public HealthCheckController(ApplicationDbContext dbContext)
        {
            _dbContext = dbContext;
        }

Then how can I get httpcontext then? I want to check the database availability.


Viewing all articles
Browse latest Browse all 9386

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>