Skip to content
Docs Try Aspire

IResourceWithEnvironment.withReference

Method
📦 Aspire.Hosting v13.2.0-preview.1.26159.1
interface IResourceWithEnvironment {
// ... omitted for brevity
withReference(
source: IResourceWithConnectionString,
connectionName?: string,
optional?: boolean): IResourceWithEnvironment;
}

Signature

method withReference builder
Adds a reference to another resource
withReference(
source: IResourceWithConnectionString,
connectionName?: string,
optional?: boolean): IResourceWithEnvironment
source IResourceWithConnectionString
connectionName string optional
optional boolean optional = False
IResourceWithEnvironment

Defined on

This method is defined on the following type: