Skip to content

Added overload of AddConnectionString using the builder pattern to make it more approachable#8251

Merged
davidfowl merged 5 commits intomainfrom
davidfowl/cs-overload
Mar 23, 2025
Merged

Added overload of AddConnectionString using the builder pattern to make it more approachable#8251
davidfowl merged 5 commits intomainfrom
davidfowl/cs-overload

Conversation

@davidfowl
Copy link
Member

Description

Added overload of AddConnectionString using the builder pattern to make it more approachable

Checklist

  • Is this feature complete?
    • Yes. Ready to ship.
    • No. Follow-up changes expected.
  • Are you including unit tests for the changes and scenario tests if relevant?
    • Yes
    • No
  • Did you add public API?
    • Yes
  • Does the change make any security assumptions or guarantees?
    • Yes
      • If yes, have you done a threat model and had a security review?
        • Yes
        • No
    • No
  • Does the change require an update in our Aspire docs?

Copilot AI review requested due to automatic review settings March 22, 2025 05:42
@davidfowl davidfowl requested a review from mitchdenny as a code owner March 22, 2025 05:42
@github-actions github-actions bot added the area-app-model Issues pertaining to the APIs in Aspire.Hosting, e.g. DistributedApplication label Mar 22, 2025
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR adds an overload for AddConnectionString that leverages the builder pattern, making the API more approachable for constructing connection strings.

  • Introduces a new overload method with appropriate XML documentation and example code.
  • Updates the test suite to reflect the new API and corrects a typo in a test method name.

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
src/Aspire.Hosting/ConnectionStringBuilderExtensions.cs Adds the overload and XML comments using the builder pattern to construct connection strings.
tests/Aspire.Hosting.Tests/WithReferenceTests.cs Fixes a test method name typo and introduces a new test for the builder overload.

davidfowl and others added 3 commits March 21, 2025 22:45
@davidfowl davidfowl merged commit b3cc78f into main Mar 23, 2025
163 checks passed
@davidfowl davidfowl deleted the davidfowl/cs-overload branch March 23, 2025 12:47
@github-actions github-actions bot locked and limited conversation to collaborators Apr 23, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

area-app-model Issues pertaining to the APIs in Aspire.Hosting, e.g. DistributedApplication

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants