forked from CommunityToolkit/Aspire
-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Wait for dependent resources before depolying the .dacpac
fixes CommunityToolkit#373
- Loading branch information
Showing
3 changed files
with
22 additions
and
12 deletions.
There are no files selected for viewing
17 changes: 12 additions & 5 deletions
17
...-database-projects/CommunityToolkit.Aspire.Hosting.SqlDatabaseProjects.AppHost/Program.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,19 @@ | ||
var builder = DistributedApplication.CreateBuilder(args); | ||
|
||
var server = builder.AddSqlServer("sql") | ||
.AddDatabase("TargetDatabase"); | ||
var server = builder.AddSqlServer("sql"); | ||
|
||
builder.AddSqlProject<Projects.SdkProject>("sdk-project") | ||
.WithReference(server); | ||
var database = server.AddDatabase("TargetDatabase"); | ||
|
||
var otherDatabase = server.AddDatabase("OtherTargetDatabase"); | ||
|
||
var sdkProject = builder.AddSqlProject<Projects.SdkProject>("sdk-project") | ||
.WithReference(database); | ||
|
||
var otherProject = builder.AddSqlProject<Projects.SdkProject>("other-sdk-project") | ||
.WithReference(otherDatabase) | ||
.WaitForCompletion(sdkProject); | ||
|
||
builder.AddSqlPackage<Packages.ErikEJ_Dacpac_Chinook>("chinook") | ||
.WithReference(server); | ||
.WithReference(database); | ||
|
||
builder.Build().Run(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters