---
title: "Class TypedEntityRelationAttribute"
slug: "sdk--stylelabs.m.sdk.models.typed.attributes.typedentityrelationattribute"
abstract: ""
---
# Class TypedEntityRelationAttribute

By default the entity relation name is inferred from the declared property name. If that name is not suitable, this attribute allows to specify an alternate name.

## Inheritance

object

TypedEntityRelationAttribute

## Namespace: StylelabsStylelabs.MSdkStylelabs.M.Sdk.ModelsTypedAttributes

## Assembly: Stylelabs.M.Sdk.dll

## Syntax

```csharp
public class TypedEntityRelationAttribute : Attribute
```

## Constructors

### TypedEntityRelationAttribute(string)

Initializes a new instance of the [TypedEntityRelationAttribute](https://doc.sitecore.com/ch/en/developers/api-reference/sdk--stylelabs.m.sdk.models.typed.attributes.typedentityrelationattribute.html) class.

#### Declaration

```csharp
public TypedEntityRelationAttribute(string relationName)
```

#### Parameters

| Type | Name | Description |
| --- | --- | --- |
| string | relationName | The relation name. |

## Properties

### RelationName

Gets the property name.

#### Declaration

```csharp
public string RelationName { get; }
```

#### Property Value

| Type | Description |
| --- | --- |
| string |  |
