Definition
The division between modeling a dependency in the AppHost and connecting to that dependency inside an application.
- Also known as
- The relationship, integration relationship
A hosting integration and a client integration serve different layers of the same application:
- The AppHost uses a hosting integration to model the service, such as a PostgreSQL server and database.
- A resource reference passes the database’s connection information to the consuming API.
- The API uses a client integration or its usual database library to read that configuration and connect.
For .NET, Aspire.Hosting.PostgreSQL belongs in the AppHost and Aspire.Npgsql belongs in the application. A Python or JavaScript API can consume the same configuration with its own PostgreSQL client; it does not need a .NET client package.
Practical example
The AppHost provisions connection information for a named database; the API uses its database client to open the connection.