Creating new namespace programmatically using the dotnet framework

Hi Community,

is there a way to create a namespace programmatically using the dotnet framework. The samples only use the „default“ namespace?

I know it is recommended to used tctl.

How can I check in dotnet if the namespace exists?

Are you using cloud or self-hosted? Here is the general document for registering/managing namespaces for cloud and self-hosted. They use tcld or tctl CLIs, and programmatically you can invoke those via process exec. If you are self-hosted, there is technically an advanced approach of calling the RegisterNamespace gRPC call directly. This call is RegisterNamespaceAsync on the WorkflowService property of the Connection property of the client.

If cloud or self-hosted, can use aforementioned CLIs. If self-hosted, you can also use the ListNamespacesAsync call adjacent to the RegisterNamespaceAsync. Note however that a present namespace doesn’t mean ready to use. You can only know that by attempting to run a simple workflow on it.

Sorry, I forgot to mention that I want to use the self-hosted temporal option.

This is what I was looking for, the “raw” gRPC service.

Thank you very much!