Class TableAttribute
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
Collation
Table collation (e.g., "utf8mb4_unicode_ci"). Optional.
public string? Collation { get; set; }
Property Value
Comment
Table comment. Optional.
public string? Comment { get; set; }
Property Value
Engine
MySQL storage engine. Default: InnoDB.
public TableEngine Engine { get; set; }
Property Value
Name
Custom table name. Defaults to the class name if null.
public string? Name { get; set; }