> ## Documentation Index
> Fetch the complete documentation index at: https://easyaf.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# EdmProperty

> Represents a property in an OData entity type or complex type.

export function DocsBadge({text, variant = 'neutral'}) {
  const variantClasses = {
    success: 'mint-bg-green-500/10 mint-text-green-600 dark:mint-text-green-400 mint-border-green-500/20',
    neutral: 'mint-bg-slate-500/10 mint-text-slate-600 dark:mint-text-slate-400 mint-border-slate-500/20',
    info: 'mint-bg-blue-500/10 mint-text-blue-600 dark:mint-text-blue-400 mint-border-blue-500/20',
    warning: 'mint-bg-amber-500/10 mint-text-amber-600 dark:mint-text-amber-400 mint-border-amber-500/20',
    danger: 'mint-bg-red-500/10 mint-text-red-600 dark:mint-text-red-400 mint-border-red-500/20'
  };
  const classes = variantClasses[variant] || variantClasses.neutral;
  return <span className={`mint-inline-flex mint-items-center mint-px-2 mint-py-0.5 mint-rounded-full mint-text-xs mint-font-medium mint-tracking-wide mint-border mint-ml-1.5 mint-align-middle mint-whitespace-nowrap ${classes}`}>
      {text}
    </span>;
}

## Definition

**Assembly:** Microsoft.OData.Mcp.Core.dll

**Namespace:** Microsoft.OData.Mcp.Core.Models

**Inheritance:** System.Object

## Syntax

```csharp theme={"dark"}
Microsoft.OData.Mcp.Core.Models.EdmProperty
```

## Summary

Represents a property in an OData entity type or complex type.

## Remarks

Properties define the structure and data characteristics of entity types and complex types.
They specify the name, type, and various constraints of the data elements.

## Constructors

### <Icon icon="hammer" iconType="duotone" color="#419AC5" size={24} style={{ paddingRight: '8px' }} />  .ctor

Initializes a new instance of the [EdmProperty](/odata-mcp/api-reference/Microsoft/OData/Mcp/Core/Models/EdmProperty) class.

#### Syntax

```csharp theme={"dark"}
public EdmProperty()
```

### <Icon icon="hammer" iconType="duotone" color="#419AC5" size={24} style={{ paddingRight: '8px' }} />  .ctor

Initializes a new instance of the [EdmProperty](/odata-mcp/api-reference/Microsoft/OData/Mcp/Core/Models/EdmProperty) class with the specified name and type.

#### Syntax

```csharp theme={"dark"}
public EdmProperty(string name, string type)
```

#### Parameters

| Name   | Type     | Description               |
| ------ | -------- | ------------------------- |
| `name` | `string` | The name of the property. |
| `type` | `string` | The type of the property. |

#### Exceptions

| Exception           | Description                                         |
| ------------------- | --------------------------------------------------- |
| `ArgumentException` | Thrown when *name* or *type* is null or whitespace. |

### <Icon icon="hammer" iconType="duotone" color="#419AC5" size={24} style={{ paddingRight: '8px' }} />  .ctor <DocsBadge text="Inherited" variant="neutral" />

<Note>Inherited from `object`</Note>

#### Syntax

```csharp theme={"dark"}
public Object()
```

## Properties

### <Icon icon="tag" iconType="duotone" color="#419AC5" size={24} style={{ paddingRight: '8px' }} />  DefaultValue

Gets or sets the default value of the property.

#### Syntax

```csharp theme={"dark"}
public string DefaultValue { get; set; }
```

#### Property Value

Type: `string?`
The default value as a string, or `null` if not specified.

#### Remarks

The default value is represented as it appears in the CSDL metadata.
Type-specific parsing is required when using this value.

### <Icon icon="tag" iconType="duotone" color="#419AC5" size={24} style={{ paddingRight: '8px' }} />  Description

Gets or sets the description of the property.

#### Syntax

```csharp theme={"dark"}
public string Description { get; set; }
```

#### Property Value

Type: `string?`
A human-readable description of the property's purpose.

### <Icon icon="tag" iconType="duotone" color="#419AC5" size={24} style={{ paddingRight: '8px' }} />  ElementType

Gets the element type for collection properties.

#### Syntax

```csharp theme={"dark"}
public string ElementType { get; }
```

#### Property Value

Type: `string`
The element type of the collection, or the type itself if not a collection.

### <Icon icon="tag" iconType="duotone" color="#419AC5" size={24} style={{ paddingRight: '8px' }} />  HasDefaultValue

Gets a value indicating whether the property has a default value.

#### Syntax

```csharp theme={"dark"}
public bool HasDefaultValue { get; }
```

#### Property Value

Type: `bool`
`true` if the property has a default value; otherwise, `false`.

### <Icon icon="tag" iconType="duotone" color="#419AC5" size={24} style={{ paddingRight: '8px' }} />  IsCollection

Gets a value indicating whether this property represents a collection type.

#### Syntax

```csharp theme={"dark"}
public bool IsCollection { get; }
```

#### Property Value

Type: `bool`
`true` if the property type is a collection; otherwise, `false`.

### <Icon icon="tag" iconType="duotone" color="#419AC5" size={24} style={{ paddingRight: '8px' }} />  IsKey

Gets or sets a value indicating whether this property is part of the entity key.

#### Syntax

```csharp theme={"dark"}
public bool IsKey { get; set; }
```

#### Property Value

Type: `bool`
`true` if the property is a key property; otherwise, `false`.

#### Remarks

Key properties uniquely identify an entity instance and are typically non-nullable.

### <Icon icon="tag" iconType="duotone" color="#419AC5" size={24} style={{ paddingRight: '8px' }} />  IsNullable

Gets a value indicating whether the property is nullable (alias for Nullable property).

#### Syntax

```csharp theme={"dark"}
public bool IsNullable { get; }
```

#### Property Value

Type: `bool`
`true` if the property is nullable; otherwise, `false`.

### <Icon icon="tag" iconType="duotone" color="#419AC5" size={24} style={{ paddingRight: '8px' }} />  IsPrimitive

Gets a value indicating whether this property represents a primitive type.

#### Syntax

```csharp theme={"dark"}
public bool IsPrimitive { get; }
```

#### Property Value

Type: `bool`
`true` if the property type is an EDM primitive type; otherwise, `false`.

### <Icon icon="tag" iconType="duotone" color="#419AC5" size={24} style={{ paddingRight: '8px' }} />  MaxLength

Gets or sets the maximum length of the property value.

#### Syntax

```csharp theme={"dark"}
public System.Nullable<int> MaxLength { get; set; }
```

#### Property Value

Type: `System.Nullable<int>`
The maximum length, or `null` if not specified.

#### Remarks

This constraint applies primarily to string and binary properties.
A value of "Max" in the metadata is represented as `null` here.

### <Icon icon="tag" iconType="duotone" color="#419AC5" size={24} style={{ paddingRight: '8px' }} />  Name

Gets or sets the name of the property.

#### Syntax

```csharp theme={"dark"}
public required string Name { get; set; }
```

#### Property Value

Type: `string`
The property name as defined in the CSDL metadata.

### <Icon icon="tag" iconType="duotone" color="#419AC5" size={24} style={{ paddingRight: '8px' }} />  Nullable

Gets or sets a value indicating whether the property can contain null values.

#### Syntax

```csharp theme={"dark"}
public bool Nullable { get; set; }
```

#### Property Value

Type: `bool`
`true` if the property is nullable; otherwise, `false`.

#### Remarks

When not specified in the metadata, this property defaults to `true` for most types,
except for key properties which are typically non-nullable.

### <Icon icon="tag" iconType="duotone" color="#419AC5" size={24} style={{ paddingRight: '8px' }} />  Precision

Gets or sets the precision of the property value.

#### Syntax

```csharp theme={"dark"}
public System.Nullable<int> Precision { get; set; }
```

#### Property Value

Type: `System.Nullable<int>`
The precision, or `null` if not specified.

#### Remarks

Precision applies to decimal and temporal types, indicating the total number of digits.

### <Icon icon="tag" iconType="duotone" color="#419AC5" size={24} style={{ paddingRight: '8px' }} />  Scale

Gets or sets the scale of the property value.

#### Syntax

```csharp theme={"dark"}
public System.Nullable<int> Scale { get; set; }
```

#### Property Value

Type: `System.Nullable<int>`
The scale, or `null` if not specified.

#### Remarks

Scale applies to decimal types, indicating the number of digits after the decimal point.
A value of "Variable" in the metadata is represented as `null` here.

### <Icon icon="tag" iconType="duotone" color="#419AC5" size={24} style={{ paddingRight: '8px' }} />  SRID

Gets or sets the SRID (Spatial Reference System Identifier) for spatial properties.

#### Syntax

```csharp theme={"dark"}
public string SRID { get; set; }
```

#### Property Value

Type: `string?`
The SRID value, or `null` if not applicable or not specified.

#### Remarks

This property is relevant only for geography and geometry types.

### <Icon icon="tag" iconType="duotone" color="#419AC5" size={24} style={{ paddingRight: '8px' }} />  Type

Gets or sets the type of the property.

#### Syntax

```csharp theme={"dark"}
public required string Type { get; set; }
```

#### Property Value

Type: `string`
The fully qualified type name (e.g., "Edm.String", "Namespace.EntityType").

### <Icon icon="tag" iconType="duotone" color="#419AC5" size={24} style={{ paddingRight: '8px' }} />  TypeName

Gets the type name of the property (alias for Type property).

#### Syntax

```csharp theme={"dark"}
public string TypeName { get; }
```

#### Property Value

Type: `string`
The fully qualified type name (e.g., "Edm.String", "Namespace.EntityType").

### <Icon icon="tag" iconType="duotone" color="#419AC5" size={24} style={{ paddingRight: '8px' }} />  Unicode

Gets or sets a value indicating whether the property uses Unicode encoding.

#### Syntax

```csharp theme={"dark"}
public System.Nullable<bool> Unicode { get; set; }
```

#### Property Value

Type: `System.Nullable<bool>`
`true` if Unicode is enabled; `false` if disabled; `null` if not specified.

#### Remarks

This property applies to string properties and affects how the data is stored and transmitted.

## Methods

### <Icon icon="code-merge" iconType="duotone" color="#419AC5" size={24} style={{ paddingRight: '8px' }} />  Equals <DocsBadge text="Override" variant="info" />

Determines whether the specified object is equal to the current property.

#### Syntax

```csharp theme={"dark"}
public override bool Equals(object obj)
```

#### Parameters

| Name  | Type      | Description                                      |
| ----- | --------- | ------------------------------------------------ |
| `obj` | `object?` | The object to compare with the current property. |

#### Returns

Type: `bool`
`true` if the specified object is equal to the current property; otherwise, `false`.

### <Icon icon="code-fork" iconType="duotone" color="#419AC5" size={24} style={{ paddingRight: '8px' }} />  Equals <DocsBadge text="Inherited" variant="neutral" /> <DocsBadge text="Virtual" variant="warning" />

<Note>Inherited from `object`</Note>

#### Syntax

```csharp theme={"dark"}
public virtual bool Equals(object obj)
```

#### Parameters

| Name  | Type      | Description |
| ----- | --------- | ----------- |
| `obj` | `object?` | -           |

#### Returns

Type: `bool`

### <Icon icon="thumbtack" iconType="duotone" color="#419AC5" size={24} style={{ paddingRight: '8px' }} />  Equals <DocsBadge text="Inherited" variant="neutral" />

<Note>Inherited from `object`</Note>

#### Syntax

```csharp theme={"dark"}
public static bool Equals(object objA, object objB)
```

#### Parameters

| Name   | Type      | Description |
| ------ | --------- | ----------- |
| `objA` | `object?` | -           |
| `objB` | `object?` | -           |

#### Returns

Type: `bool`

### <Icon icon="code-merge" iconType="duotone" color="#419AC5" size={24} style={{ paddingRight: '8px' }} />  GetHashCode <DocsBadge text="Override" variant="info" />

Returns a hash code for the current property.

#### Syntax

```csharp theme={"dark"}
public override int GetHashCode()
```

#### Returns

Type: `int`
A hash code for the current property.

### <Icon icon="code-fork" iconType="duotone" color="#419AC5" size={24} style={{ paddingRight: '8px' }} />  GetHashCode <DocsBadge text="Inherited" variant="neutral" /> <DocsBadge text="Virtual" variant="warning" />

<Note>Inherited from `object`</Note>

#### Syntax

```csharp theme={"dark"}
public virtual int GetHashCode()
```

#### Returns

Type: `int`

### <Icon icon="function" iconType="duotone" color="#419AC5" size={24} style={{ paddingRight: '8px' }} />  GetType <DocsBadge text="Inherited" variant="neutral" />

<Note>Inherited from `object`</Note>

#### Syntax

```csharp theme={"dark"}
public System.Type GetType()
```

#### Returns

Type: `System.Type`

### <Icon icon="function" iconType="duotone" color="#419AC5" size={24} style={{ paddingRight: '8px' }} />  MemberwiseClone <DocsBadge text="Inherited" variant="neutral" />

<Note>Inherited from `object`</Note>

#### Syntax

```csharp theme={"dark"}
protected internal object MemberwiseClone()
```

#### Returns

Type: `object`

### <Icon icon="thumbtack" iconType="duotone" color="#419AC5" size={24} style={{ paddingRight: '8px' }} />  ReferenceEquals <DocsBadge text="Inherited" variant="neutral" />

<Note>Inherited from `object`</Note>

#### Syntax

```csharp theme={"dark"}
public static bool ReferenceEquals(object objA, object objB)
```

#### Parameters

| Name   | Type      | Description |
| ------ | --------- | ----------- |
| `objA` | `object?` | -           |
| `objB` | `object?` | -           |

#### Returns

Type: `bool`

### <Icon icon="code-merge" iconType="duotone" color="#419AC5" size={24} style={{ paddingRight: '8px' }} />  ToString <DocsBadge text="Override" variant="info" />

Returns a string representation of the property.

#### Syntax

```csharp theme={"dark"}
public override string ToString()
```

#### Returns

Type: `string`
A string containing the property name and type.

### <Icon icon="code-fork" iconType="duotone" color="#419AC5" size={24} style={{ paddingRight: '8px' }} />  ToString <DocsBadge text="Inherited" variant="neutral" /> <DocsBadge text="Virtual" variant="warning" />

<Note>Inherited from `object`</Note>

#### Syntax

```csharp theme={"dark"}
public virtual string ToString()
```

#### Returns

Type: `string?`
