Skip to content
Docs Try Aspire
Docs Try

SqlProjectResource

Handle
📦 CommunityToolkit.Aspire.Hosting.SqlDatabaseProjects v13.4.0
interface SqlProjectResource
extends IResource,
IResourceWithDacpac,
IResourceWithWaitSupport {
readonly dacDeployOptionsPath: string;
readonly dacpacPath: string;
readonly skipWhenDeployed: boolean;
withConnectionReference(target: IResourceWithConnectionString): SqlProjectResource;
withDacDeployOptions(optionsPath: string): SqlProjectResource;
withDacpac(dacpacPath: string): SqlProjectResource;
withReference(target: SqlServerDatabaseResource): SqlProjectResource;
withSkipWhenDeployed(): SqlProjectResource;
}

Properties

property dacDeployOptionsPath string get
Gets the configured path to the deployment options publish profile.
property dacpacPath string get
Gets the configured path to the .dacpac file.
property skipWhenDeployed boolean get
Gets a value indicating whether deployment should be skipped when the dacpac has already been deployed.

Methods

Publishes the SQL Server database project to a connection string resource.
withConnectionReference(target: IResourceWithConnectionString): SqlProjectResource
target IResourceWithConnectionString
SqlProjectResource
method withDacDeployOptions builder
Sets the publish profile path used for DAC deployment options.
withDacDeployOptions(optionsPath: string): SqlProjectResource
optionsPath string
SqlProjectResource
method withDacpac builder
Specifies the path to the .dacpac file.
withDacpac(dacpacPath: string): SqlProjectResource
dacpacPath string
SqlProjectResource
method withReference builder
Publishes the SQL Server database project to a SQL Server database resource.
withReference(target: SqlServerDatabaseResource): SqlProjectResource
target SqlServerDatabaseResource
SqlProjectResource
method withSkipWhenDeployed builder
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