Aspirerelease/17.0
Watch Aspire live streamsDocsTry Aspire

SqlProjectResource

Handle
📦 CommunityToolkit.Aspire.Hosting.SqlDatabaseProjects v13.6.1

Represents a SQL Server Database project resource.

type SqlProjectResource interface {
Resource
ResourceWithWaitSupport
}

Properties

propertyDacDeployOptionsPath*stringget
Gets the configured path to the deployment options publish profile.
DacDeployOptionsPath() (*string, error)
propertyDacpacPath*stringget
Gets the configured path to the .dacpac file.
DacpacPath() (*string, error)
propertySkipWhenDeployedboolget
Gets a value indicating whether deployment should be skipped when the dacpac has already been deployed.
SkipWhenDeployed() (bool, error)

Methods

Publishes the SQL Server database project to a connection string resource.
WithConnectionReference(target ResourceWithConnectionString) SqlProjectResource
targetResourceWithConnectionStringAn IResourceBuilder representing the target IResourceWithConnectionString to publish the SQL Server Database project to.
SqlProjectResource

An IResourceBuilder that can be used to further customize the resource.

Returns a handle; failures surface later via Err().

Sets the publish profile path used for DAC deployment options.
WithDacDeployOptions(optionsPath string) SqlProjectResource
optionsPathstringPath to the publish profile xml file
SqlProjectResource

An IResourceBuilder that can be used to further customize the resource.

Returns a handle; failures surface later via Err().

methodWithDacpacbuilder
Specifies the path to the .dacpac file.
WithDacpac(dacpacPath string) SqlProjectResource
dacpacPathstringPath to the .dacpac file.
SqlProjectResource

An IResourceBuilder that can be used to further customize the resource.

Returns a handle; failures surface later via Err().

methodWithReferencebuilder
Publishes the SQL Server database project to a SQL Server database resource.
WithReference(target SqlServerDatabaseResource) SqlProjectResource
targetSqlServerDatabaseResourceAn IResourceBuilder representing the target SqlServerDatabaseResource to publish the SQL Server Database project to.
SqlProjectResource

An IResourceBuilder that can be used to further customize the resource.

Returns a handle; failures surface later via Err().

Specifies that .dacpac deployment should be skipped if metadata in the target database indicates that the .dacpac has already been deployed in its current state.
WithSkipWhenDeployed() SqlProjectResource
SqlProjectResource

An IResourceBuilder that can be used to further customize the resource.

Returns a handle; failures surface later via Err().