Skip to content
DocsTry Aspire
DocsTry

IResourceWithEnvironment.withReference

Method
📦 Aspire.Hosting v13.4.0
interface IResourceWithEnvironment {
// ... 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

Defined on

This method is defined on the following type: