A worker service gives some kind of super-power to a console application. A worker service in .NET is a console app that runs a long-running task once the application is started, till it's signaled to close. It does not require user interaction. It r...

Markdown supported · ⌘↵ to post
Hello, this is an excellent articule, but; this module: CreateDbIfNoneExist(host) can not be called because DOES NOT EXISTS in the context, you call it from Main and it is declared out. Any help?
Somanath Sutar
How do I write MS unit test for DbHelper.cs? I am unable to mock. In each DbHelper method there is _dbContext = new AppDbContext(GetAllOptions()) and GetAllOptions is looking for connection string. So overall it doesn't look right for mocking and creating unit test cases. Any example will help.