Skip to content
This repository has been archived by the owner on Dec 10, 2018. It is now read-only.
/ t4models Public archive

Commit

Permalink
Merge branch 'master' into release
Browse files Browse the repository at this point in the history
  • Loading branch information
ili committed Aug 30, 2017
2 parents 444c497 + 629a307 commit 7fb582c
Show file tree
Hide file tree
Showing 117 changed files with 31,673 additions and 27,650 deletions.
4 changes: 2 additions & 2 deletions NuGet/linq2db.Access.nuspec
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<package xmlns="http://schemas.microsoft.com/packaging/2010/07/nuspec.xsd">
<metadata>
<id>linq2db.Access</id>
<version>1.8.3</version>
<version>1.9.0</version>
<title>LINQ to Access</title>
<authors>Igor Tkachev</authors>
<owners />
Expand All @@ -18,7 +18,7 @@
</summary>
<tags>linq linq2db Access LinqToDB ORM database DB SQL</tags>
<dependencies>
<dependency id="linq2db.t4models" version="1.8.3"/>
<dependency id="linq2db.t4models" version="1.9.0"/>
</dependencies>
</metadata>
<files>
Expand Down
4 changes: 2 additions & 2 deletions NuGet/linq2db.DB2.nuspec
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<package xmlns="http://schemas.microsoft.com/packaging/2010/07/nuspec.xsd">
<metadata>
<id>linq2db.DB2</id>
<version>1.8.3</version>
<version>1.9.0</version>
<title>LINQ to IBM DB2</title>
<authors>Igor Tkachev</authors>
<owners />
Expand All @@ -19,7 +19,7 @@
</summary>
<tags>linq linq2db DB2 LinqToDB ORM database DB SQL</tags>
<dependencies>
<dependency id="linq2db.t4models" version="1.8.3"/>
<dependency id="linq2db.t4models" version="1.9.0"/>
</dependencies>
</metadata>
<files>
Expand Down
4 changes: 2 additions & 2 deletions NuGet/linq2db.Firebird.nuspec
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<package xmlns="http://schemas.microsoft.com/packaging/2010/07/nuspec.xsd">
<metadata>
<id>linq2db.Firebird</id>
<version>1.8.3</version>
<version>1.9.0</version>
<title>LINQ to Firebird</title>
<authors>Igor Tkachev</authors>
<owners />
Expand All @@ -18,7 +18,7 @@
</summary>
<tags>linq linq2db Firebird LinqToDB ORM database DB SQL</tags>
<dependencies>
<dependency id="linq2db.t4models" version="1.8.3"/>
<dependency id="linq2db.t4models" version="1.9.0"/>
</dependencies>
</metadata>
<files>
Expand Down
4 changes: 2 additions & 2 deletions NuGet/linq2db.Informix.nuspec
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<package xmlns="http://schemas.microsoft.com/packaging/2010/07/nuspec.xsd">
<metadata>
<id>linq2db.Informix</id>
<version>1.8.3</version>
<version>1.9.0</version>
<title>LINQ to Informix</title>
<authors>Igor Tkachev</authors>
<owners />
Expand All @@ -19,7 +19,7 @@
</summary>
<tags>linq linq2db Informix LinqToDB ORM database DB SQL</tags>
<dependencies>
<dependency id="linq2db.t4models" version="1.8.3"/>
<dependency id="linq2db.t4models" version="1.9.0"/>
</dependencies>
</metadata>
<files>
Expand Down
4 changes: 2 additions & 2 deletions NuGet/linq2db.MySql.nuspec
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<package xmlns="http://schemas.microsoft.com/packaging/2010/07/nuspec.xsd">
<metadata>
<id>linq2db.MySql</id>
<version>1.8.3</version>
<version>1.9.0</version>
<title>LINQ to MySql</title>
<authors>Igor Tkachev</authors>
<owners />
Expand All @@ -18,7 +18,7 @@
</summary>
<tags>linq linq2db MySql LinqToDB ORM database DB SQL</tags>
<dependencies>
<dependency id="linq2db.t4models" version="1.8.3"/>
<dependency id="linq2db.t4models" version="1.9.0"/>
</dependencies>
</metadata>
<files>
Expand Down
4 changes: 2 additions & 2 deletions NuGet/linq2db.Oracle.Managed.nuspec
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<package xmlns="http://schemas.microsoft.com/packaging/2010/07/nuspec.xsd">
<metadata>
<id>linq2db.Oracle.Managed</id>
<version>1.8.3</version>
<version>1.9.0</version>
<title>LINQ to Oracle (ODP.NET) Managed</title>
<authors>Igor Tkachev</authors>
<owners />
Expand All @@ -19,7 +19,7 @@
</summary>
<tags>linq linq2db Oracle LinqToDB ORM database DB SQL</tags>
<dependencies>
<dependency id="linq2db.t4models" version="1.8.3"/>
<dependency id="linq2db.t4models" version="1.9.0"/>
</dependencies>
</metadata>
<files>
Expand Down
4 changes: 2 additions & 2 deletions NuGet/linq2db.Oracle.x64.nuspec
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<package xmlns="http://schemas.microsoft.com/packaging/2010/07/nuspec.xsd">
<metadata>
<id>linq2db.Oracle.x64</id>
<version>1.8.3</version>
<version>1.9.0</version>
<title>LINQ to Oracle (ODP.NET) x64</title>
<authors>Igor Tkachev</authors>
<owners />
Expand All @@ -19,7 +19,7 @@
</summary>
<tags>linq linq2db Oracle ODP LinqToDB ORM database DB SQL</tags>
<dependencies>
<dependency id="linq2db.t4models" version="1.8.3"/>
<dependency id="linq2db.t4models" version="1.9.0"/>
</dependencies>
</metadata>
<files>
Expand Down
4 changes: 2 additions & 2 deletions NuGet/linq2db.Oracle.x86.nuspec
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<package xmlns="http://schemas.microsoft.com/packaging/2010/07/nuspec.xsd">
<metadata>
<id>linq2db.Oracle.x86</id>
<version>1.8.3</version>
<version>1.9.0</version>
<title>LINQ to Oracle (ODP.NET) x86</title>
<authors>Igor Tkachev</authors>
<owners />
Expand All @@ -19,7 +19,7 @@
</summary>
<tags>linq linq2db Oracle ODP LinqToDB ORM database DB SQL</tags>
<dependencies>
<dependency id="linq2db.t4models" version="1.8.3"/>
<dependency id="linq2db.t4models" version="1.9.0"/>
</dependencies>
</metadata>
<files>
Expand Down
17 changes: 9 additions & 8 deletions NuGet/linq2db.PostgreSQL.nuspec
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<package xmlns="http://schemas.microsoft.com/packaging/2010/07/nuspec.xsd">
<metadata>
<id>linq2db.PostgreSQL</id>
<version>1.8.3</version>
<version>1.9.0</version>
<title>LINQ to PostgreSQL</title>
<authors>Igor Tkachev</authors>
<owners />
Expand All @@ -18,16 +18,17 @@
</summary>
<tags>linq linq2db Npgsql PostgreSQL LinqToDB ORM database DB SQL</tags>
<dependencies>
<dependency id="linq2db.t4models" version="1.8.3"/>
<dependency id="linq2db.t4models" version="1.9.0"/>
</dependencies>
</metadata>
<files>
<file src="..\packages\Npgsql.2.2.6\lib\net40\Npgsql.dll" target="tools" />
<file src="..\packages\Npgsql.2.2.6\lib\net40\Mono.Security.dll" target="tools" />
<file src="LinqToDB.PostgreSQL.Tools.ttinclude" target="content\LinqToDB.Templates" />
<file src="CopyMe.PostgreSQL.tt.txt" target="content\LinqToDB.Templates" />
<file src="..\packages\System.Threading.Tasks.Extensions.4.3.0\lib\portable-net45+win8+wp8+wpa81\System.Threading.Tasks.Extensions.dll"
target="tools" />
<file src="..\packages\Npgsql.3.2.5\lib\net45\Npgsql.dll" target="tools" />
<file src="LinqToDB.PostgreSQL.Tools.ttinclude" target="content\LinqToDB.Templates" />
<file src="CopyMe.PostgreSQL.tt.txt" target="content\LinqToDB.Templates" />

<file src="init.ps1" target="tools" />
<file src="CopyMe.PostgreSQL.Core.tt.txt" target="tools" />
<file src="init.ps1" target="tools" />
<file src="CopyMe.PostgreSQL.Core.tt.txt" target="tools" />
</files>
</package>
4 changes: 2 additions & 2 deletions NuGet/linq2db.SQLite.nuspec
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<package xmlns="http://schemas.microsoft.com/packaging/2010/07/nuspec.xsd">
<metadata>
<id>linq2db.SQLite</id>
<version>1.8.3</version>
<version>1.9.0</version>
<title>LINQ to SQLite</title>
<authors>Igor Tkachev</authors>
<owners />
Expand All @@ -18,7 +18,7 @@
</summary>
<tags>linq linq2db SQLite LinqToDB ORM database DB SQL</tags>
<dependencies>
<dependency id="linq2db.t4models" version="1.8.3"/>
<dependency id="linq2db.t4models" version="1.9.0"/>
</dependencies>
</metadata>
<files>
Expand Down
4 changes: 2 additions & 2 deletions NuGet/linq2db.SapHana.nuspec
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<package xmlns="http://schemas.microsoft.com/packaging/2010/07/nuspec.xsd">
<metadata>
<id>linq2db.SapHana</id>
<version>1.8.3</version>
<version>1.9.0</version>
<title>LINQ to SAP HANA</title>
<authors>Igor Tkachev</authors>
<owners />
Expand All @@ -19,7 +19,7 @@
</summary>
<tags>linq linq2db SapHana LinqToDB ORM database DB SQL</tags>
<dependencies>
<dependency id="linq2db.t4models" version="1.8.3"/>
<dependency id="linq2db.t4models" version="1.9.0"/>
</dependencies>
</metadata>
<files>
Expand Down
4 changes: 2 additions & 2 deletions NuGet/linq2db.SqlCe.nuspec
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<package xmlns="http://schemas.microsoft.com/packaging/2010/07/nuspec.xsd">
<metadata>
<id>linq2db.SqlCe</id>
<version>1.8.3</version>
<version>1.9.0</version>
<title>LINQ to SqlCe</title>
<authors>Igor Tkachev</authors>
<owners />
Expand All @@ -18,7 +18,7 @@
</summary>
<tags>linq linq2db SqlCe SqlServerCe SqlServer Compact LinqToDB ORM database DB SQL</tags>
<dependencies>
<dependency id="linq2db.t4models" version="1.8.3"/>
<dependency id="linq2db.t4models" version="1.9.0"/>
</dependencies>
</metadata>
<files>
Expand Down
4 changes: 2 additions & 2 deletions NuGet/linq2db.SqlServer.nuspec
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<package xmlns="http://schemas.microsoft.com/packaging/2010/07/nuspec.xsd">
<metadata>
<id>linq2db.SqlServer</id>
<version>1.8.3</version>
<version>1.9.0</version>
<title>LINQ to SqlServer</title>
<authors>Igor Tkachev</authors>
<owners />
Expand All @@ -18,7 +18,7 @@
</summary>
<tags>linq linq2db SqlServer LinqToDB ORM database DB SQL</tags>
<dependencies>
<dependency id="linq2db.t4models" version="1.8.3"/>
<dependency id="linq2db.t4models" version="1.9.0"/>
</dependencies>
</metadata>
<files>
Expand Down
4 changes: 2 additions & 2 deletions NuGet/linq2db.Sybase.nuspec
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<package xmlns="http://schemas.microsoft.com/packaging/2010/07/nuspec.xsd">
<metadata>
<id>linq2db.Sybase</id>
<version>1.8.3</version>
<version>1.9.0</version>
<title>LINQ to Sybase ASE</title>
<authors>Igor Tkachev</authors>
<owners />
Expand All @@ -19,7 +19,7 @@
</summary>
<tags>linq linq2db Sybase LinqToDB ORM database DB SQL</tags>
<dependencies>
<dependency id="linq2db.t4models" version="1.8.3"/>
<dependency id="linq2db.t4models" version="1.9.0"/>
</dependencies>
</metadata>
<files>
Expand Down
8 changes: 4 additions & 4 deletions NuGet/linq2db.t4models.nuspec
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<package xmlns="http://schemas.microsoft.com/packaging/2010/07/nuspec.xsd">
<metadata>
<id>linq2db.t4models</id>
<version>1.8.3</version>
<version>1.9.0</version>
<title>LINQ to DB T4 Models</title>
<authors>Igor Tkachev</authors>
<owners />
Expand All @@ -23,17 +23,17 @@
<dependencies>

<group targetFramework="netstandard1.6">
<dependency id="linq2db.Core" version="1.8.3"/>
<dependency id="linq2db.Core" version="1.9.0"/>
</group>

<group targetFramework="net40">
<dependency id="linq2db" version="1.8.3"/>
<dependency id="linq2db" version="1.9.0"/>
</group>

</dependencies>
</metadata>
<files>
<file src="..\packages\linq2db.1.8.3\lib\net40\linq2db.dll" target="tools" />
<file src="..\packages\linq2db.1.9.0\lib\net40\linq2db.dll" target="tools" />
<file src="init.ps1" target="tools" />

<file src="..\ReadMe.md" target="content\LinqToDB.Templates" />
Expand Down
39 changes: 24 additions & 15 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,24 +45,26 @@ There are few main steps in this file:
Use the following initialization **before** you call the `LoadMetadata()` method.

```c#
NamespaceName = "DataModels"; // Namespace of the generated classes.
NamespaceName = "DataModels"; // Namespace of the generated classes.
DataContextName = null; // DataContext class name. If null - database name + "DB".
BaseDataContextClass = null; // Base DataContext class name. If null - LinqToDB.Data.DataConnection.
GenerateConstructors = true; // Enforce generating DataContext constructors.
DefaultConfiguration = null; // Defines default configuration for default DataContext constructor.
DataContextName = null; // DataContext class name. If null - database name + "DB".
BaseDataContextClass = null; // Base DataContext class name. If null - LinqToDB.Data.DataConnection.
GenerateConstructors = true; // Enforce generating DataContext constructors.
DefaultConfiguration = null; // Defines default configuration for default DataContext constructor.
BaseEntityClass = null; // Base Entity class name. If null - none.
DatabaseName = null; // Table database name - [Table(Database="DatabaseName")].
GenerateDatabaseName = false; // Always generate table database name, even though DatabaseName is null.
IncludeDefaultSchema = true; // Default schema name is generated - [Table(Database="Northwind", Schema="dbo", Name="Customers")]
OneToManyAssociationType = "IEnumerable<{0}>"; // One To Many association type. Change it to "List<{0}>" if needed.
GenerateAssociations = true; // Enforce generating associations.
GenerateBackReferences = true; // Enforce generating backreference associations.
BaseEntityClass = null; // Base Entity class name. If null - none.
DatabaseName = null; // Table database name - [Table(Database="DatabaseName")].
GenerateDatabaseName = false; // Always generate table database name, even though DatabaseName is null.
IncludeDefaultSchema = true; // Default schema name is generated - [Table(Database="Northwind", Schema="dbo", Name="Customers")]
ReplaceSimilarTables = true; // Replaces stored procedure result class names with similar to existing table class names.
GenerateFindExtensions = true; // Generates find extension methods based on PKs information.
IsCompactColumns = true; // If true, column compact view.
OneToManyAssociationType = "IEnumerable<{0}>"; // One To Many association type (for members only). Change it to "List<{0}>" if needed.
GenerateAssociations = true; // Enforce generating associations as type members.
GenerateBackReferences = true; // Enforce generating backreference associations (affects both members and extensions).
GenerateAssociationExtensions = false; // Enforce generating associations as extension methods. NB: this option does not affect GenerateAssociations. This will require linq2db 1.9.0 and above
ReplaceSimilarTables = true; // Replaces stored procedure result class names with similar to existing table class names.
GenerateFindExtensions = true; // Generates find extension methods based on PKs information.
IsCompactColumns = true; // If true, column compact view.
PluralizeClassNames = false; // If true, pluralizes table class names.
SingularizeClassNames = true; // If true, singularizes table class names.
Expand All @@ -86,6 +88,13 @@ GetSchemaOptions.IncludedSchemas = new[] { "TestUser", "SYS" }; // Defines o
GetSchemaOptions.ExcludedCatalogs = new[] { "TestUser", "SYSSTAT" }; // Defines excluded catalogs.
GetSchemaOptions.IncludedCatalogs = new[] { "TestUser", "SYS" }; // Defines only included catalogs.
Func<string, bool, string> ToValidName = ToValidNameDefault; // Defines function to convert names to valid (My_Table to MyTable)
Func<string, bool, string> ConvertToCompilable = ConvertToCompilableDefault; // Converts name to c# compatible. By default removes uncompatible symbols and converts result with ToValidName
Func<ForeignKey, string> GetAssociationExtensionSinglularName = GetAssociationExtensionSinglularNameDefault; // Gets singular method extension method name for association
Func<ForeignKey, string> GetAssociationExtensionPluralName = GetAssociationExtensionPluralNameDefault; // Gets plural method extension method name for association
```

## Provider specific configurations
Expand Down
Loading

0 comments on commit 7fb582c

Please sign in to comment.