39 references to AddDatabase
Aspire.Hosting.Azure.Tests (4)
AzureBicepResourceTests.cs (3)
1284postgres.AddDatabase("db", "dbName"); 1402postgres.AddDatabase("db", "dbName"); 1511postgres.AddDatabase("db");
AzureSchemaTests.cs (1)
19builder.AddPostgres("postgres").PublishAsAzurePostgresFlexibleServer().AddDatabase("db");
Aspire.Hosting.PostgreSQL (1)
PostgresBuilderExtensions.cs (1)
105/// Note that by default calling <see cref="AddDatabase(IResourceBuilder{PostgresServerResource}, string, string?)"/>
Aspire.Hosting.PostgreSQL.Tests (20)
AddPostgresTests.cs (13)
172.AddDatabase("db"); 195appBuilder.AddPostgres("postgres", password: pass, port: 1234).AddDatabase("db"); 249var db = pgServer.AddDatabase("db"); 507var db1 = pg1.AddDatabase("db1"); 508var db2 = pg2.AddDatabase("db2"); 555db.AddDatabase("db"); 557Assert.Throws<DistributedApplicationException>(() => db.AddDatabase("db")); 566.AddDatabase("db"); 569Assert.Throws<DistributedApplicationException>(() => db.AddDatabase("db")); 579var db1 = postgres1.AddDatabase("db1", "customers1"); 580var db2 = postgres1.AddDatabase("db2", "customers2"); 595.AddDatabase("db1", "imports"); 598.AddDatabase("db2", "imports");
PostgrePublicApiTests.cs (2)
19var action = () => builder.AddDatabase(name); 32var action = () => postgres.AddDatabase(name);
PostgresFunctionalTests.cs (5)
113var db = postgres.AddDatabase(postgresDbName); 154var db = pg.AddDatabase(dbName); 212var db1 = postgres1.AddDatabase(postgresDbName); 280var db2 = postgres2.AddDatabase(postgresDbName); 380var db = postgres.AddDatabase(postgresDbName);
Aspire.Hosting.Tests (1)
ManifestGenerationTests.cs (1)
273program.AppBuilder.AddPostgres("postgrescontainer").AddDatabase("postgresdatabase");
PostgresEndToEnd.AppHost (11)
Program.cs (11)
7var db1 = builder.AddPostgres("pg1").WithPgAdmin().AddDatabase("db1"); 8var db2 = builder.AddPostgres("pg2").WithPgAdmin().AddDatabase("db2"); 10var db3 = pg3.AddDatabase("db3"); 11var db4 = pg3.AddDatabase("db4"); 14var db5 = builder.AddPostgres("pg4").WithPgAdmin().PublishAsContainer().AddDatabase("db5"); 15var db6 = builder.AddPostgres("pg5").WithPgAdmin().PublishAsContainer().AddDatabase("db6"); 17var db7 = pg6.AddDatabase("db7"); 18var db8 = pg6.AddDatabase("db8"); 19var db9 = pg6.AddDatabase("db9", "db8"); // different connection string (db9) on same database as db8 22var db10 = builder.AddPostgres("pg10").WithPgAdmin().PublishAsConnectionString().AddDatabase("db10"); 24var db11 = builder.AddPostgres("pg11").WithPgWeb().AddDatabase("postgres");
TestProject.AppHost (1)
TestProgram.cs (1)
83.AddDatabase(postgresDbName);
TestShop.AppHost (1)
Program.cs (1)
6.AddDatabase("catalogdb");