diff --git a/src/Aspire.Hosting.MySql/MySqlBuilderExtensions.cs b/src/Aspire.Hosting.MySql/MySqlBuilderExtensions.cs index c5d20cc2935..1257d218db6 100644 --- a/src/Aspire.Hosting.MySql/MySqlBuilderExtensions.cs +++ b/src/Aspire.Hosting.MySql/MySqlBuilderExtensions.cs @@ -92,6 +92,19 @@ public static IResourceBuilder AddMySql(this IDistributedAp /// The name of the resource. This name will be used as the connection string name when referenced in a dependency. /// The name of the database. If not provided, this defaults to the same value as . /// A reference to the . + /// + /// + /// When adding a to your application model the resource can then + /// be referenced by other resources using the resource name. When the dependent resource is using + /// the extension method + /// then the dependent resource will wait until the MySQL database is available. + /// + /// + /// Note that calling + /// will result in the database being created on the MySQL server when the server becomes ready. + /// The database creation happens automatically as part of the resource lifecycle. + /// + /// public static IResourceBuilder AddDatabase(this IResourceBuilder builder, [ResourceName] string name, string? databaseName = null) { ArgumentNullException.ThrowIfNull(builder); diff --git a/src/Aspire.Hosting.PostgreSQL/PostgresBuilderExtensions.cs b/src/Aspire.Hosting.PostgreSQL/PostgresBuilderExtensions.cs index ffb79e3b7cb..780d65cc401 100644 --- a/src/Aspire.Hosting.PostgreSQL/PostgresBuilderExtensions.cs +++ b/src/Aspire.Hosting.PostgreSQL/PostgresBuilderExtensions.cs @@ -129,10 +129,9 @@ public static IResourceBuilder AddPostgres(this IDistrib /// extension method then the dependent resource will wait until the Postgres database is available. /// /// - /// Note that by default calling - /// does not result in the database being created on the Postgres server. It is expected that code within your solution - /// will create the database. As a result if - /// is used with this resource it will wait indefinitely until the database exists. + /// Note that calling + /// will result in the database being created on the Postgres server when the server becomes ready. + /// The database creation happens automatically as part of the resource lifecycle. /// /// public static IResourceBuilder AddDatabase(this IResourceBuilder builder, [ResourceName] string name, string? databaseName = null) diff --git a/src/Aspire.Hosting.SqlServer/SqlServerBuilderExtensions.cs b/src/Aspire.Hosting.SqlServer/SqlServerBuilderExtensions.cs index a45888cff0d..4fc3fcfd154 100644 --- a/src/Aspire.Hosting.SqlServer/SqlServerBuilderExtensions.cs +++ b/src/Aspire.Hosting.SqlServer/SqlServerBuilderExtensions.cs @@ -96,6 +96,19 @@ public static IResourceBuilder AddSqlServer(this IDistr /// The name of the resource. This name will be used as the connection string name when referenced in a dependency. /// The name of the database. If not provided, this defaults to the same value as . /// A reference to the . + /// + /// + /// When adding a to your application model the resource can then + /// be referenced by other resources using the resource name. When the dependent resource is using + /// the extension method + /// then the dependent resource will wait until the SQL Server database is available. + /// + /// + /// Note that calling + /// will result in the database being created on the SQL Server when the server becomes ready. + /// The database creation happens automatically as part of the resource lifecycle. + /// + /// public static IResourceBuilder AddDatabase(this IResourceBuilder builder, [ResourceName] string name, string? databaseName = null) { ArgumentNullException.ThrowIfNull(builder);