# Use Interfaces with DotNet-SDK

**URL:** <https://community.temporal.io/t/use-interfaces-with-dotnet-sdk/18692>\
**Category:** Community Support\
**Tags:** dotnet-sdk\
**Created:** [November 21, 2025, 2:03pm UTC](https://community.temporal.io/t/use-interfaces-with-dotnet-sdk/18692 "2025-11-21T14:03:44Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Peter2000](https://avatars.discourse-cdn.com/v4/letter/p/9dc877/32.png) [@Peter2000](https://community.temporal.io/u/Peter2000)\
**Post date:** [November 21, 2025, 2:03pm UTC](https://community.temporal.io/t/use-interfaces-with-dotnet-sdk/18692/1 "2025-11-21T14:03:44Z")

</div>

Hey guys,

I’m new to the party and trying to implement a use case using DotNet.  
I looked through the examples in DotNet and other languages but could find a solution to seperate the workflow definition from the actual implementation like e.g. in Java.

Am I missing something? Is there a way to ship only the abstract workflow definition (RunMethod, Signals, Updates and Queries to all relevant parties) and not the actual implementation and their dependencies like activities which depend on database or other services?

thank you and best regards,  
Peter

---

<div class="post-metadata">

**Author:** ![Chad\_Retz](https://sea2.discourse-cdn.com/flex016/user_avatar/community.temporal.io/chad_retz/32/1396_2.png) [@Chad\_Retz](https://community.temporal.io/u/Chad_Retz)\
**Post date:** [November 21, 2025, 2:13pm UTC](https://community.temporal.io/t/use-interfaces-with-dotnet-sdk/18692/2 "2025-11-21T14:13:28Z")

</div>

From [GitHub - temporalio/sdk-dotnet: Temporal .NET SDK](https://github.com/temporalio/sdk-dotnet?tab=readme-ov-file#workflow-definition:)

> Interfaces and abstract methods can have these attributes. This is helpful for defining a workflow implemented elsewhere. But if/when implemented, all pieces of the implementation should have the attributes too.

Java forces this separation, .NET simply allows it if wanted, but we don’t have an explicit sample showing just this. Can look at our [ActivityWorker](https://github.com/temporalio/samples-dotnet/tree/main/src/ActivityWorker) sample which shows calling a Go workflow from a .NET client and therefore had to [represent the Go workflow as a .NET interface](https://github.com/temporalio/samples-dotnet/blob/5a8cbdd3c9ad35213e781ef519fd01313b215391/src/ActivityWorker/Program.cs#L43-L49). And [here is the actual test](https://github.com/temporalio/sdk-dotnet/blob/e4000fb97a26002c6f32ac8fd081b829be52bd67/tests/Temporalio.Tests/Worker/WorkflowWorkerTests.cs#L87-L111) in our SDK asserting the functionality.

---

<div class="post-metadata">

**Author:** ![Peter2000](https://avatars.discourse-cdn.com/v4/letter/p/9dc877/32.png) [@Peter2000](https://community.temporal.io/u/Peter2000)\
**Post date:** [November 21, 2025, 2:30pm UTC](https://community.temporal.io/t/use-interfaces-with-dotnet-sdk/18692/3 "2025-11-21T14:30:12Z")

</div>

Thank you for the really quick response!

I was able to make work now like you suggested.

Best regards,  
Peter
