From bca11a01eb0edbc909e25b703f1e79c42d90d801 Mon Sep 17 00:00:00 2001 From: platyscript <244315239+platyscript@users.noreply.github.com> Date: Fri, 9 Jan 2026 04:18:51 +0000 Subject: [PATCH] Add sample yaml file --- src/DbApiBuilderEntityGenerator/sample.yaml | 47 +++++++++++++++++++++ 1 file changed, 47 insertions(+) create mode 100644 src/DbApiBuilderEntityGenerator/sample.yaml diff --git a/src/DbApiBuilderEntityGenerator/sample.yaml b/src/DbApiBuilderEntityGenerator/sample.yaml new file mode 100644 index 0000000..65f6735 --- /dev/null +++ b/src/DbApiBuilderEntityGenerator/sample.yaml @@ -0,0 +1,47 @@ +# the connection string to the database +connectionString: "Data Source=(local);Initial Catalog=Tracker;Integrated Security=True" + +# the database provider name. Default:SqlServer +provider: SqlServer + +# config name to read the connection string from the user secrets file +connectionName: "ConnectionStrings:Generator" + +# the user secret identifier, can be shared with .net core project +userSecretsId: + "984ef0cf-2b22-4fd1-876d-e01499da4c1f" + + # tables to include or empty to include all +tables: + - Priority + - Status + - Task + - User + +# schemas to include or empty to include all +schemas: + - dbo + +# exclude tables or columns +exclude: + # list of expressions for tables to exclude, source is Schema.TableName + tables: + - exact: dbo.SchemaVersions + - regex: dbo\.SchemaVersions$ + # list of expressions for columns to exclude, source is Schema.TableName.ColumnName + columns: + - exact: dbo.SchemaVersions\.Version + - regex: dbo\.SchemaVersions\.Version$ + +# how to generate entity class names from the table name. Preserve|Plural|Singular. Default: Singular +entityNaming: Singular + +# how to generate relationship collections names for the entity. Default: Plural +relationshipNaming: Plural + +# Rename entities and properties with regular expressions. Matched expressions will be removed. +renaming: + entities: + - ^(sp|tbl|udf|vw)_ + properties: + - ^{Table.Name}(?=Id|Name)