Table of Contents

Class TableAttribute

Namespace
CL.MySQL2.Models
Assembly
CL.MySQL2.dll

Marks a class as a database table entity. Apply to a class to enable table sync and repository operations.

[AttributeUsage(AttributeTargets.Class, Inherited = false)]
public sealed class TableAttribute : Attribute
Inheritance
TableAttribute
Inherited Members

Properties

Charset

Table character set. Default: utf8mb4.

public Charset Charset { get; set; }

Property Value

Charset

Collation

Table collation (e.g., "utf8mb4_unicode_ci"). Optional.

public string? Collation { get; set; }

Property Value

string

Comment

Table comment. Optional.

public string? Comment { get; set; }

Property Value

string

Engine

MySQL storage engine. Default: InnoDB.

public TableEngine Engine { get; set; }

Property Value

TableEngine

Name

Custom table name. Defaults to the class name if null.

public string? Name { get; set; }

Property Value

string