Skip to content
DocsTry Aspire
DocsTry

withReference

Method
📦 Aspire.Hosting v13.4.0
interface ContainerResource {
// ... omitted for brevity
withReference(
source: EndpointReference|string|uri,
connectionName?: string,
optional?: boolean,
name?: string): IResourceWithEnvironment;
}

Signature

methodwithReferencebuilder
Adds a reference to another resource
withReference(
source: EndpointReference|string|uri,
connectionName?: string,
optional?: boolean,
name?: string): IResourceWithEnvironment
sourceEndpointReference|string|uri
connectionNamestringoptional
optionalbooleanoptional= False
namestringoptional
IResourceWithEnvironment

Applies to

This method applies to the following types: