{"id":13594920,"url":"https://github.com/ardalis/CleanArchitecture.WorkerService","last_synced_at":"2025-04-09T10:32:17.830Z","repository":{"id":37617511,"uuid":"216062147","full_name":"ardalis/CleanArchitecture.WorkerService","owner":"ardalis","description":"A solution template using Clean Architecture for building a .NET Core Worker Service.","archived":false,"fork":false,"pushed_at":"2024-07-13T10:06:56.000Z","size":118,"stargazers_count":789,"open_issues_count":14,"forks_count":102,"subscribers_count":15,"default_branch":"main","last_synced_at":"2025-04-03T14:12:28.700Z","etag":null,"topics":["architecture","clean-architecture","clean-code","hacktoberfest"],"latest_commit_sha":null,"homepage":"","language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ardalis.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-10-18T16:11:13.000Z","updated_at":"2025-04-03T02:06:25.000Z","dependencies_parsed_at":"2023-11-20T21:28:16.106Z","dependency_job_id":"1eeab61f-2209-4ea4-b6ef-6fbb58100f1c","html_url":"https://github.com/ardalis/CleanArchitecture.WorkerService","commit_stats":null,"previous_names":[],"tags_count":0,"template":true,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ardalis%2FCleanArchitecture.WorkerService","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ardalis%2FCleanArchitecture.WorkerService/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ardalis%2FCleanArchitecture.WorkerService/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ardalis%2FCleanArchitecture.WorkerService/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ardalis","download_url":"https://codeload.github.com/ardalis/CleanArchitecture.WorkerService/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248020593,"owners_count":21034459,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["architecture","clean-architecture","clean-code","hacktoberfest"],"created_at":"2024-08-01T16:01:40.912Z","updated_at":"2025-04-09T10:32:15.242Z","avatar_url":"https://github.com/ardalis.png","language":"C#","funding_links":[],"categories":["hacktoberfest","C#","C\\#"],"sub_categories":[],"readme":"# CleanArchitecture.WorkerService\n\nA solution template using Clean Architecture for building a .NET 7.0 Worker Service.\n\n## Give a Star! :star:\n\nIf you like or are using this project to learn or start your solution, please give it a star. Thanks!\n\n## Credits\n\nBig thanks to [all of the great contributors to this project](https://github.com/ardalis/CleanArchitecture.WorkerService/graphs/contributors)!\n\n## Build Status \n\n[![.NET Core](https://github.com/ardalis/CleanArchitecture.WorkerService/actions/workflows/dotnetcore.yml/badge.svg)](https://github.com/ardalis/CleanArchitecture.WorkerService/actions/workflows/dotnetcore.yml)\n\n## Getting Started\n\nClone or download the repository.\n\nInstall the ef core cli tools `dotnet tool install --global dotnet-ef`. If you already have an old version, first try `dotnet tool update --global dotnet-ef  --version 6.0.0-*`, if that doesn't work, see [Updating Ef Core Cli](https://github.com/aspnet/EntityFrameworkCore/issues/14016#issuecomment-487308603) First, delete C:\\Users\\{yourUser}\\.dotnet\\tools\\.store\\dotnet-ef tool.\n\nThis app is currently configured to run against a localdb SQL Server instance. To initialized the database, you will need to run this command in the /src/CleanArchitecture.Worker folder:\n\n```powershell\ndotnet ef database update -c appdbcontext -p ../CleanArchitecture.Infrastructure/CleanArchitecture.Infrastructure.csproj -s CleanArchitecture.Worker.csproj\n```\n\nCheck the connection string in `appsettings.json` in the CleanArchitecture.Worker project to verify its details if you have problems.\n\nOpen the solution in Visual Studio and run it with ctrl-F5 (the CleanArchitecture.Worker project should be the startup project) or in the console go to the `src/CleanArchitecture.Worker` folder and run `dotnet run`.\n\nOn startup the app queues up 10 URLs to hit (google.com) and you should see it make 10 requests and save them to the database and then do nothing, logging each second.\n\n## Using this for your own worker service\n\nTo use this as a template for your own worker server projects, make the following changes:\n\n- Rename CleanArchitecture to YourAppName or YourCompany.YourAppName\n- Configure the connection string to your database if you're using one\n- Replace InMemory queue implementations with Azure, AWS, Rabbit, etc. actual queues you're using\n- Remove UrlStatusHistory and related services and interfaces\n\n## References\n\n- [Clean Architecture template for ASP.NET Core solutions](https://github.com/ardalis/CleanArchitecture)\n- [Creating a Clean Architecture Worker Service Template](https://www.youtube.com/watch?v=_jfnnAMNb94) ([Twitch](https://twitch.tv/ardalis) Stream 1)\n- [Creating a Clean Architecture Worker Service Template](https://www.youtube.com/watch?v=Nttt33GoTXg) ([Twitch](https://twitch.tv/ardalis) Stream 2)\n\nUseful Pluralsight courses:\n- [SOLID Principles of Object Oriented Design](https://www.pluralsight.com/courses/principles-oo-design)\n- [SOLID Principles for C# Developers](https://www.pluralsight.com/courses/csharp-solid-principles)\n- [Domain-Driven Design Fundamentals](https://www.pluralsight.com/courses/domain-driven-design-fundamentals)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fardalis%2FCleanArchitecture.WorkerService","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fardalis%2FCleanArchitecture.WorkerService","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fardalis%2FCleanArchitecture.WorkerService/lists"}