39 references to AddDatabase
Aspire.Hosting.Azure.Tests (4)
AzureBicepResourceTests.cs (3)
1284
postgres.
AddDatabase
("db", "dbName");
1402
postgres.
AddDatabase
("db", "dbName");
1511
postgres.
AddDatabase
("db");
AzureSchemaTests.cs (1)
19
builder.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");
195
appBuilder.AddPostgres("postgres", password: pass, port: 1234).
AddDatabase
("db");
249
var db = pgServer.
AddDatabase
("db");
507
var db1 = pg1.
AddDatabase
("db1");
508
var db2 = pg2.
AddDatabase
("db2");
555
db.
AddDatabase
("db");
557
Assert.Throws<DistributedApplicationException>(() => db.
AddDatabase
("db"));
566
.
AddDatabase
("db");
569
Assert.Throws<DistributedApplicationException>(() => db.
AddDatabase
("db"));
579
var db1 = postgres1.
AddDatabase
("db1", "customers1");
580
var db2 = postgres1.
AddDatabase
("db2", "customers2");
595
.
AddDatabase
("db1", "imports");
598
.
AddDatabase
("db2", "imports");
PostgrePublicApiTests.cs (2)
19
var action = () => builder.
AddDatabase
(name);
32
var action = () => postgres.
AddDatabase
(name);
PostgresFunctionalTests.cs (5)
113
var db = postgres.
AddDatabase
(postgresDbName);
154
var db = pg.
AddDatabase
(dbName);
212
var db1 = postgres1.
AddDatabase
(postgresDbName);
280
var db2 = postgres2.
AddDatabase
(postgresDbName);
380
var db = postgres.
AddDatabase
(postgresDbName);
Aspire.Hosting.Tests (1)
ManifestGenerationTests.cs (1)
273
program.AppBuilder.AddPostgres("postgrescontainer").
AddDatabase
("postgresdatabase");
PostgresEndToEnd.AppHost (11)
Program.cs (11)
7
var db1 = builder.AddPostgres("pg1").WithPgAdmin().
AddDatabase
("db1");
8
var db2 = builder.AddPostgres("pg2").WithPgAdmin().
AddDatabase
("db2");
10
var db3 = pg3.
AddDatabase
("db3");
11
var db4 = pg3.
AddDatabase
("db4");
14
var db5 = builder.AddPostgres("pg4").WithPgAdmin().PublishAsContainer().
AddDatabase
("db5");
15
var db6 = builder.AddPostgres("pg5").WithPgAdmin().PublishAsContainer().
AddDatabase
("db6");
17
var db7 = pg6.
AddDatabase
("db7");
18
var db8 = pg6.
AddDatabase
("db8");
19
var db9 = pg6.
AddDatabase
("db9", "db8"); // different connection string (db9) on same database as db8
22
var db10 = builder.AddPostgres("pg10").WithPgAdmin().PublishAsConnectionString().
AddDatabase
("db10");
24
var 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");