TableConfig

Classes > DataProvider > TableConfig

Configuration for a single table

public sealed record TableConfig : IEquatable<TableConfig>

Example

// Configure a table with custom settings
var tableConfig = new TableConfig
{
    Schema = "dbo",
    Name = "Patients",
    GenerateInsert = true,
    GenerateUpdate = true,
    GenerateDelete = false,
    ExcludeColumns = new List<string> { "computed_column" }.AsReadOnly(),
    PrimaryKeyColumns = new List<string> { "Id" }.AsReadOnly()
};

Properties

Schema

public string Schema { get; init; }

Table schema (e.g., "dbo" for SQL Server, "main" for SQLite)

Name

public string Name { get; init; }

Table name

GenerateInsert

public bool GenerateInsert { get; init; }

Whether to generate Insert extension methods

GenerateUpdate

public bool GenerateUpdate { get; init; }

Whether to generate Update extension methods

GenerateDelete

public bool GenerateDelete { get; init; }

Whether to generate Delete extension methods

ExcludeColumns

public IReadOnlyList<string> ExcludeColumns { get; init; }

Columns to exclude from generation (e.g., computed columns)

PrimaryKeyColumns

public IReadOnlyList<string> PrimaryKeyColumns { get; init; }

Primary key columns (auto-detected if not specified)