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

# ColumnAttribute

> Specifies the column name and optional type for a property.             If not specified, the property name is used as the column name.

## Definition

**Assembly:** CloudNimble.BlazorEssentials.TursoDb.dll

**Namespace:** CloudNimble.BlazorEssentials.TursoDb

**Inheritance:** System.Attribute

## Syntax

```csharp theme={"dark"}
CloudNimble.BlazorEssentials.TursoDb.ColumnAttribute
```

## Summary

Specifies the column name and optional type for a property.
If not specified, the property name is used as the column name.

## Constructors

### <Icon icon="hammer" iconType="duotone" color="#419AC5" size={24} className="mr-2" /> .ctor

Initializes a new instance of the [ColumnAttribute](/blazoressentials/api-reference/CloudNimble/BlazorEssentials/TursoDb/ColumnAttribute) class.

#### Syntax

```csharp theme={"dark"}
public ColumnAttribute(string name)
```

#### Parameters

| Name   | Type     | Description                      |
| ------ | -------- | -------------------------------- |
| `name` | `string` | The column name in the database. |

#### Exceptions

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

## Properties

### <Icon icon="tag" iconType="duotone" color="#419AC5" size={24} className="mr-2" /> DefaultValue

Gets or sets the default value for the column.

#### Syntax

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

#### Property Value

Type: `string?`

### <Icon icon="tag" iconType="duotone" color="#419AC5" size={24} className="mr-2" /> Name

Gets the column name in the database.

#### Syntax

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

#### Property Value

Type: `string`

### <Icon icon="tag" iconType="duotone" color="#419AC5" size={24} className="mr-2" /> Nullable

Gets or sets whether the column allows NULL values.
If not specified, nullability is inferred from the property type.

#### Syntax

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

#### Property Value

Type: `System.Nullable<bool>?`

### <Icon icon="tag" iconType="duotone" color="#419AC5" size={24} className="mr-2" /> Type

Gets or sets the SQLite column type (e.g., "TEXT", "INTEGER", "REAL", "BLOB").
If not specified, the type is inferred from the property type.

#### Syntax

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

#### Property Value

Type: `string?`
