{"id":48429100,"url":"https://github.com/pejmannik/durabletask-dotnet-aspnet","last_synced_at":"2026-04-06T10:00:56.678Z","repository":{"id":269771676,"uuid":"907551571","full_name":"PejmanNik/durabletask-dotnet-aspnet","owner":"PejmanNik","description":"running Durable Functions/Tasks as a self-hosted service in ASP.NET Core","archived":false,"fork":false,"pushed_at":"2025-12-20T19:19:40.000Z","size":39,"stargazers_count":14,"open_issues_count":0,"forks_count":3,"subscribers_count":3,"default_branch":"main","last_synced_at":"2026-02-16T18:54:12.400Z","etag":null,"topics":["asp-net-core","csharp","durable-functions","durabletask","orchestration"],"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/PejmanNik.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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2024-12-23T21:11:52.000Z","updated_at":"2025-12-30T19:13:46.000Z","dependencies_parsed_at":"2026-04-06T10:00:53.348Z","dependency_job_id":null,"html_url":"https://github.com/PejmanNik/durabletask-dotnet-aspnet","commit_stats":null,"previous_names":["pejmannik/durabletask-dotnet-aspnet"],"tags_count":7,"template":false,"template_full_name":null,"purl":"pkg:github/PejmanNik/durabletask-dotnet-aspnet","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PejmanNik%2Fdurabletask-dotnet-aspnet","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PejmanNik%2Fdurabletask-dotnet-aspnet/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PejmanNik%2Fdurabletask-dotnet-aspnet/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PejmanNik%2Fdurabletask-dotnet-aspnet/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/PejmanNik","download_url":"https://codeload.github.com/PejmanNik/durabletask-dotnet-aspnet/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PejmanNik%2Fdurabletask-dotnet-aspnet/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31467985,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-06T08:36:52.050Z","status":"ssl_error","status_checked_at":"2026-04-06T08:36:51.267Z","response_time":112,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["asp-net-core","csharp","durable-functions","durabletask","orchestration"],"created_at":"2026-04-06T10:00:43.938Z","updated_at":"2026-04-06T10:00:56.668Z","avatar_url":"https://github.com/PejmanNik.png","language":"C#","readme":"# Self-Hosted Durable Task Worker in Asp .Net Core\n\nThis project enables running DurableTask without a sidecar project, \nallowing the worker to be self-hosted. It provides a seamless way to integrate \nDurable Task functionality directly into your Asp .Net Core project.\n\n## Usage\n\nTo use this project effectively, you should already understand the concepts of the Microsoft Durable Task Framework and how to work with it. Microsoft provides comprehensive documentation that covers these topics in detail.\n\nInstall the [![NuGet version (Sisu.DurableTask.AspNetCore)](https://img.shields.io/nuget/vpre/Sisu.DurableTask.AspNetCore)](https://www.nuget.org/packages/Sisu.DurableTask.AspNetCore/) package.\n\n```\ndotnet add package Sisu.DurableTask.AspNetCore\n```\n\n\u003e [!NOTE]\n\u003e To respect the DurableTask domain and reserve it for official packages, \nI added a prefix to the project assembly. In Finnish culture, **sisu** represents determination, perseverance, and resilience, which felt like a fitting touch!\n\nThen, register the host with your preferred [orchestration service](https://github.com/Azure/durabletask?tab=readme-ov-file#supported-persistance-stores)\n\n``` csharp\nusing DurableTask.AspNetCore;\nusing DurableTask.AzureStorage;\n\nvar orchestrationServiceAndClient = new AzureStorageOrchestrationService(new()\n{\n    StorageAccountClientProvider = new StorageAccountClientProvider(\"....\"),\n});\n\nbuilder.Services.AddSelfHostedDurableTaskHub(orchestrationServiceAndClient);\n```\n\nFinally, register the [durabletask-dotnet](https://github.com/microsoft/durabletask-dotnet) services and add `UseSelfHosted` to both the worker and client.\n\n``` csharp\nusing Microsoft.DurableTask;\nusing Microsoft.DurableTask.Client;\nusing Microsoft.DurableTask.Worker;\n\n// Add all the generated tasks\nbuilder.Services.AddDurableTaskWorker(builder =\u003e\n{\n    builder\n        .AddTasks(r =\u003e r.AddAllGeneratedTasks());\n        .UseSelfHosted();\n});\n\nbuilder.Services.AddDurableTaskClient(b =\u003e b.UseSelfHosted());\n\n```\n\nNow you can inject the `DurableTaskClient` into your classes to schedule or manage durable tasks. For more detailed examples, check out the samples folder.\n\n### Durable Entities\n\nTo use durable entities, **Enable entity work item separation** by setting `UseSeparateQueueForEntityWorkItems = true` in your `OrchestrationService`.\n\n```csharp\n\n// Configure the orchestration service\nvar orchestrationServiceAndClient = new AzureStorageOrchestrationService(new()\n{\n    ...\n    UseSeparateQueueForEntityWorkItems = true\n});\n\n// Register the worker and tasks\nbuilder.Services.AddDurableTaskWorker(builder =\u003e\n{\n    builder\n        .AddTasks(r =\u003e r.AddAllGeneratedTasks())\n        .UseSelfHosted();\n});\n\n[DurableTask]\npublic sealed class MyCounterEntity : TaskEntity\u003cint\u003e\n{\n    public void Add(int amount)\n    {\n        State += amount;\n    }\n}\n```\n\nFor more detailed examples, check out the samples folder.\n\n## Under the Hood\n\nThe [durabletask-dotnet](https://github.com/microsoft/durabletask-dotnet) project is built on top of \nthe [Durable Task Framework](https://github.com/Azure/durabletask?tab=readme-ov-file#supported-persistance-stores). \nIt provides an easy way to run durable tasks using Dependency Injection and `IHostedService` as a background service in your application. \nOne of its standout features is a type-safe source generator for orchestrators and activities, making it a breeze to work with. However,\n\"It's specifically designed to connect to a \"sidecar\" process, such as the Azure Functions .NET Isolated host, a special purpose sidecar container, or potentially even Dapr.\",\nso it use gRPC to communicate with the sidecar. In this project the gRPC communication \nis replaced with a direct call to the `DurableTaskHub` service that runs in the same process.\n\n## Acknowledgements\n\n[durabletask-dotnet](https://github.com/microsoft/durabletask-dotnet) for providing the core Durable Task framework.","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpejmannik%2Fdurabletask-dotnet-aspnet","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpejmannik%2Fdurabletask-dotnet-aspnet","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpejmannik%2Fdurabletask-dotnet-aspnet/lists"}