From f02c6aaeb9e6b634ab602cf6c781172333636b0a Mon Sep 17 00:00:00 2001 From: Kasper Wegmann <126857618+nnitkasw@users.noreply.github.com> Date: Fri, 29 Nov 2024 11:01:53 +0100 Subject: [PATCH] Update hosting-sql-database-projects.md Documentation for new WithConfigureDacDeployOptions extension. Related to issue CommunityToolkit/Aspire#282 and PR CommunityToolkit/Aspire#286 --- .../hosting-sql-database-projects.md | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/docs/community-toolkit/hosting-sql-database-projects.md b/docs/community-toolkit/hosting-sql-database-projects.md index b0872aee5b..5c90d37b19 100644 --- a/docs/community-toolkit/hosting-sql-database-projects.md +++ b/docs/community-toolkit/hosting-sql-database-projects.md @@ -78,6 +78,23 @@ builder.AddSqlProject("mysqlproj") .WithReference(sql); ``` +### Deployment options support + +Define options that affect the behavior of package deployment. + +```csharp +var builder = DistributedApplication.CreateBuilder(args); + +var sql = builder.AddSqlServer("sql") + .AddDatabase("test"); + +builder.AddSqlProject("mysqlproj") + .WithConfigureDacDeployOptions(options => options.IncludeCompositeObjects = true) + .WithReference(sql); + +builder.Build().Run(); +``` + ### Redeploy support If you make changes to your SQL Database project while the app host is running, you can use the `Redeploy` custom action on the .NET Aspire dashboard to redeploy your updates without having to restart the app host.