In this post, I will be covering how to Implement a simple timer using CountDownTimer in Android using Kotlin or Java. Android provides a utility class called CountDownTimer that you use to implement the timer. Schedule a countdown until a time in the future, with regular notifications on intervals that are set. Implementing CountDownTimer in Kotlin Android […]
Browsing Month: October 2020
How to solve Http Error 500.19 – Internal Server Error in windows server IIS for Dotnet Core application
Many of us have seen this common error Http Error 500.19 – Internal Server Error in windows server IIS. In this post, I will walk you through various steps on how to troubleshoot this error for your application. According to one of the Articles in MSDN on this error, the common HResult code is 0x8007000d. […]
How to resolve Cannot access a disposed object in Dotnet Core when injecting DbContext
Accessing DbContext after it is disposed will cause a “Cannot access a disposed object in dotnet Core when injecting DbContext” error. Entity Framework (EF) Core is a lightweight, open-source. EF Core can serve as an object-relational mapper (O/RM). A DbContext instance represents a session with the database and can be used to query and save […]
Implement background tasks using IHostedService and access scoped service using IServiceScopeFactory
It is easy to implement Background tasks and scheduled work using IHostedService and the BackgroundService class. Sometimes it is required certain work to be offloaded when a Web API request is processed. That work could be accessing database records and update some information on some tables based on existing data. In this post, I’m going […]