# EndpointReferenceExpression Constructors

- Package: [Aspire.Hosting](/reference/api/csharp/aspire.hosting.md)
- Type: [EndpointReferenceExpression](/reference/api/csharp/aspire.hosting/endpointreferenceexpression.md)
- Kind: `Constructors`
- Members: `1`

Represents a property expression for an endpoint reference.

## EndpointReferenceExpression(EndpointReference, EndpointProperty)

- Name: `Constructor(EndpointReference, EndpointProperty)`
- Source: [GitHub](https://github.com/microsoft/aspire/blob/bd20f904cde09ecb9c9ae5116a6f13614bf2d7c2/src/Aspire.Hosting/ApplicationModel/EndpointReference.cs#L312-L322)

Represents a property expression for an endpoint reference.

```csharp
public class EndpointReferenceExpression
{
    public EndpointReferenceExpression(
        EndpointReference endpointReference,
        EndpointProperty property)
    {
        // ...
    }
}
```

## Parameters

- `endpointReference` ([EndpointReference](/reference/api/csharp/aspire.hosting/endpointreference.md))
  The endpoint reference.
- `property` ([EndpointProperty](/reference/api/csharp/aspire.hosting/endpointproperty.md))
  The property of the endpoint.
