I'd suggest starting with the articles on this site, for example
Creating a simple Windows Service[
^].
The nice thing about .Net is no matter what kind of project you write, the C# will often be the same. So, create a Windows Service as a new project in Visual Studio and then write the code to access the db however you need to and then read through the article for how to debug and test it.