Skip to content
Docs Try Aspire

MongoDBDatabaseResource Properties

Class Properties 4 members
A resource that represents a MongoDB database. This is a child resource of a MongoDBServerResource.
ConnectionStringExpression Section titled ConnectionStringExpression ReferenceExpression
Gets the connection string expression for the MongoDB database.
public ReferenceExpression ConnectionStringExpression { get; }
DatabaseName Section titled DatabaseName string
Gets the database name.
public string DatabaseName { get; }
Gets the parent MongoDB container resource.
public MongoDBServerResource Parent { get; }
UriExpression Section titled UriExpression ReferenceExpression
Gets the connection URI expression for the MongoDB database.
public ReferenceExpression UriExpression { get; }
Format: mongodb://[user:password@]{host}:{port}/{database}[?authSource=admin&authMechanism=SCRAM-SHA-256]. The credential and query segments are included only when a password is configured.