Skip to content

Add Nexus DI sample#186

Merged
Quinn-With-Two-Ns merged 2 commits into
mainfrom
nexus-di-samples
Jul 21, 2026
Merged

Add Nexus DI sample#186
Quinn-With-Two-Ns merged 2 commits into
mainfrom
nexus-di-samples

Conversation

@Quinn-With-Two-Ns

@Quinn-With-Two-Ns Quinn-With-Two-Ns commented Jul 16, 2026

Copy link
Copy Markdown
Contributor

What was changed

Add Nexus DI sample

Why?

Make it clear how to use DI with Nexus

Checklist

  1. Closes [Sample Request] Nexus hosted worker #118

  2. How was this tested:

  1. Any docs updates needed?

@jmaeagle99 jmaeagle99 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Small feedback but overall looks good.

Comment thread src/NexusDependencyInjection/IGreetingService.cs Outdated
Comment thread tests/NexusDependencyInjection/GreetingCallerWorkflowTests.cs Outdated
[NexusService]
public interface IGreetingService
{
static readonly string EndpointName = "my-nexus-endpoint";

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe value it as nexus-dependency-injection-endpoint, similar to how the other Nexus examples use the sample name in the endpoint.


```bash
temporal operator nexus endpoint create \
--name my-nexus-endpoint \

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Whatever you choose to do in https://github.com/temporalio/samples-dotnet/pull/186/changes#r3618052390, please replicate to here.

2. Create a Nexus endpoint that targets the handler namespace and the worker's task queue. See the
Temporal Cloud instructions at https://docs.temporal.io/nexus/registry#create-a-nexus-endpoint.
Use:
- Endpoint name: `my-nexus-endpoint`

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jmaeagle99 jmaeagle99 self-assigned this Jul 21, 2026
@Quinn-With-Two-Ns
Quinn-With-Two-Ns merged commit ce97d61 into main Jul 21, 2026
9 checks passed
@Quinn-With-Two-Ns
Quinn-With-Two-Ns deleted the nexus-di-samples branch July 21, 2026 22:42
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.

[Sample Request] Nexus hosted worker

2 participants