AzurePostgresExtensions.AddDatabase Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Adds an Azure PostgreSQL database to the application model.
public static Aspire.Hosting.ApplicationModel.IResourceBuilder<Aspire.Hosting.Azure.AzurePostgresFlexibleServerDatabaseResource> AddDatabase (this Aspire.Hosting.ApplicationModel.IResourceBuilder<Aspire.Hosting.Azure.AzurePostgresFlexibleServerResource> builder, string name, string? databaseName = default);
static member AddDatabase : Aspire.Hosting.ApplicationModel.IResourceBuilder<Aspire.Hosting.Azure.AzurePostgresFlexibleServerResource> * string * string -> Aspire.Hosting.ApplicationModel.IResourceBuilder<Aspire.Hosting.Azure.AzurePostgresFlexibleServerDatabaseResource>
<Extension()>
Public Function AddDatabase (builder As IResourceBuilder(Of AzurePostgresFlexibleServerResource), name As String, Optional databaseName As String = Nothing) As IResourceBuilder(Of AzurePostgresFlexibleServerDatabaseResource)
Parameters
The Azure PostgreSQL server resource builder.
- name
- String
The name of the resource. This name will be used as the connection string name when referenced in a dependency.
- databaseName
- String
The name of the database. If not provided, this defaults to the same value as name
.
Returns
A reference to the IResourceBuilder<T>.