toolsfolder containslinq2db.dlland, optionally, provider assemblies. Assemblies should target .net framework, as they run under .net framework x86 T4 host in Visual Studio (what about Rider?)buildfolder contains.propsfile, included into user's project. It defines MSBuild properties, needed for T4 templates preprocessor. See list of properties belowcontentFilesfolder contains set of T4 templates, used for scaffoldingcontentfolder contains copy of T4 templates, included into legacy projects (note that legacy project use templates fromcontentFilesfor scaffolding). The only reason we have this folder with copy of templates is to make templates visible to user from legacy project. Unfortunately we cannot show templates fromcontentFilesin legacy project usingItemGroupin imported.propsfile, as Visual Studio (not MS Build) doesn't support display of importedItemGroups
Properties implemented in a way to support redefinition if multiple T4 templates installed.
All T4 properties use LinqToDBT4 name prefix.
LinqToDBT4SharedTools: defines path totoolsfolder and must be used only for assemblies, included into all T4 nugets:linq2db.dll,Humanizer.dll. Defined by every T4 nuget, so last one will be used.LinqToDBT4<PROVIDER>Path: defines path totoolsfolder in nuget cache for T4 template, that use this provider to read database schema. Could be defined by multiple T4 nugets and we will use last one imported (we don't care which one). List of such properties:LinqToDBT4FirebirdClientPath: path totoolsfolder with Firebird clientLinqToDBT4MySqlConnectorClientPath: path totoolsfolder withMySqlConnectorMySql clientLinqToDBT4OracleManagedClientPath: path totoolsfolder withOracle.ManagedDataAccessOracle clientLinqToDBT4NpgsqlClientPath: path totoolsfolder withNpgsqlPostgreSQL clientLinqToDBT4SQLiteClientPath: path totoolsfolder withSystem.Data.SQLiteSQLite clientLinqToDBT4SQLServerClientPath: path totoolsfolder withMicrosoft.SqlServer.Typesassembly for SQL Server spatial typesLinqToDBT4SybaseDataActionClientPath: path totoolsfolder withAdoNetCore.AseClientSybase ASE client- all other databases require native client installed or be a part of framework
LinqToDBT4<DB>TemplatesPath: defines path to folder with T4 templates for specific database. Also could be refedined if multiple T4 nugets with same database support installed, e.g.linq2db.<DB>nuget andlinq2db.t4modelsnuget which contains support for all databasesLinqToDBT4AccessTemplatesPath: MS Access T4 templatesLinqToDBT4DB2TemplatesPath: DB2 T4 templatesLinqToDBT4FirebirdTemplatesPath: Firebird T4 templatesLinqToDBT4InformixTemplatesPath: Informix T4 templatesLinqToDBT4MySqlTemplatesPath: MySql/MariaDB T4 templatesLinqToDBT4OracleTemplatesPath: Oracle T4 templatesLinqToDBT4PostgreSQLTemplatesPath: PostgreSQL T4 templatesLinqToDBT4SapHanaTemplatesPath: SAP HANA T4 templatesLinqToDBT4SqlCeTemplatesPath: SQL CE T4 templatesLinqToDBT4SQLiteTemplatesPath: SQLite templatesLinqToDBT4SqlServerTemplatesPath: SQL Server templatesLinqToDBT4SybaseAseTemplatesPath: Sybase ASE templates