From the course: ASP.NET Core: Health Checks and Logging

Unlock the full course today

Join today to access over 22,600 courses taught by industry experts or purchase this course individually.

Challenge: Add logging to the sample app

Challenge: Add logging to the sample app - ASP.NET Core Tutorial

From the course: ASP.NET Core: Health Checks and Logging

Start my 1-month free trial

Challenge: Add logging to the sample app

(upbeat music) - [Instructor] It's time for a quick coding challenge, don't you think? Well, actually two challenges, and I hope you like them and have some joy and success in actually tackling those challenges. First of all, in the products controller on more or less line 72, plus or minus one as always, there's this weird call of Math.Max and then the page query parameter one. Basically the idea here is that if the page parameter is set to zero, we should use one instead otherwise some catastrophic things will happen. I don't know whether that is the best solution, but if the page parameter is actually set to zero, then we might want to know. So at a lock entry here, and secondly, we are using a database as you know and I've opened a database here in SQL Server Management Studio. Now what happens if I stop the database? Yes, I want to, and the question is, what happens in the app? And can you lock that?

Contents