Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix asp.net sample to use DI #49

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

jakejscott
Copy link
Contributor

Fixes DI for the asp.net sample

  1. Closes Fix aspnet DI sample #47

  2. How was this tested:
    Manually by running the web and worker and hitting http://localhost:5000

  3. Any docs updates needed?
    N/A

@cretz
Copy link
Member

cretz commented Dec 13, 2023

This was already using DI. Based on https://stackoverflow.com/questions/43240405/async-provider-in-net-core-di and others I've seen, they suggest that async be deferred until needed hence why I put the task in the container (though in retrospect maybe it should have been a lazy task).

I wonder if TemporalClientAdapter or TemporalClientProvider or whatever is something we should add to Temporalio.Extensions.Hosting. But it'd just be a lazy wrapper.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Fix aspnet DI sample
2 participants