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
Release 1.8.0
Browse files Browse the repository at this point in the history
  • Loading branch information
ili authored May 18, 2017
2 parents 9b8acfb + dbf031b commit 69b9afe
Show file tree
Hide file tree
Showing 99 changed files with 1,403 additions and 484 deletions.
2 changes: 1 addition & 1 deletion NuGet/CopyMe.Access.tt.txt
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
Console.WriteLine(c.ContactName);
}

5. See more at https://github.com/linq2db/t4models/blob/master/Templates/ReadMe.LinqToDB.md.
5. See more at https://github.com/linq2db/t4models
*/

NamespaceName = "DataModels";
Expand Down
2 changes: 1 addition & 1 deletion NuGet/CopyMe.DB2.tt.txt
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
Console.WriteLine(c.ContactName);
}

7. See more at https://github.com/linq2db/t4models/blob/master/Templates/ReadMe.LinqToDB.md.
7. See more at https://github.com/linq2db/t4models
*/

NamespaceName = "DataModels";
Expand Down
44 changes: 44 additions & 0 deletions NuGet/CopyMe.Firebird.Core.tt.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
<#@ template language="C#" debug="True" hostSpecific="True" #>
<#@ output extension=".generated.cs" #>
<#@ include file="$(SolutionDir).tools\linq2db.t4models\LinqToDB.Templates\LinqToDB.Firebird.Tools.ttinclude" #>
<#@ include file="$(SolutionDir).tools\linq2db.t4models\LinqToDB.Templates\PluralizationService.ttinclude" #>
<#
/*
1. Copy this file to a folder where you would like to generate your data model,
rename it, and delete .txt extension. For example:

MyProject
DataModels
MyDatabase.tt

2. Modify the connection settings below to connect to your database.

3. Add connection string to the web/app.config file:

<connectionStrings>
<add name="MyDatabase" connectionString="DataSource=MyServer;Database=C:\Data\MyDatabase.fdb;User Id=SYSDBA;Password=masterkey" providerName="Firebird" />
</connectionStrings>

4. To access your database use the following code:

using (var db = new MyDatabaseDB())
{
var q =
from c in db.Customers
select c;

foreach (var c in q)
Console.WriteLine(c.ContactName);
}

5. See more at https://github.com/linq2db/t4models
*/

NamespaceName = "DataModels";

LoadFirebirdMetadata("MyServer", @"C:\Data\MyDatabase.fdb");
// LoadFirebirdMetadata(string server, string database, string uid, string password);
// LoadFirebirdMetadata(string connectionString);

GenerateModel();
#>
2 changes: 1 addition & 1 deletion NuGet/CopyMe.Firebird.tt.txt
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
Console.WriteLine(c.ContactName);
}

5. See more at https://github.com/linq2db/t4models/blob/master/Templates/ReadMe.LinqToDB.md.
5. See more at https://github.com/linq2db/t4models
*/

NamespaceName = "DataModels";
Expand Down
2 changes: 1 addition & 1 deletion NuGet/CopyMe.Informix.tt.txt
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
Console.WriteLine(c.ContactName);
}

7. See more at https://github.com/linq2db/t4models/blob/master/Templates/ReadMe.LinqToDB.md.
7. See more at https://github.com/linq2db/t4models
*/

NamespaceName = "DataModels";
Expand Down
43 changes: 43 additions & 0 deletions NuGet/CopyMe.MySql.Core.tt.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
<#@ template language="C#" debug="True" hostSpecific="True" #>
<#@ output extension=".generated.cs" #>
<#@ include file="$(SolutionDir).tools\linq2db.t4models\LinqToDB.Templates\LinqToDB.MySql.Tools.ttinclude" #>
<#@ include file="$(SolutionDir).tools\linq2db.t4models\LinqToDB.Templates\PluralizationService.ttinclude" #>
<#
/*
1. Copy this file to a folder where you would like to generate your data model,
rename it, and delete .txt extension. For example:

MyProject
DataModels
MyDatabase.tt

2. Modify the connection settings below to connect to your database.

3. Add connection string to the web/app.config file:

<connectionStrings>
<add name="MyDatabase" connectionString="Server=MyServer;Port=3306;Database=MyDatabase;Uid=root;Pwd=TestPassword;charset=utf8;" providerName="MySql.Data.MySqlClient" />
</connectionStrings>

4. To access your database use the following code:

using (var db = new MyDatabaseDB())
{
var q =
from c in db.Customers
select c;

foreach (var c in q)
Console.WriteLine(c.ContactName);
}

5. See more at https://github.com/linq2db/t4models
*/

NamespaceName = "DataModels";

LoadMySqlMetadata("MyServer", "MyDatabase", "root", "TestPassword");
// LoadMySqlMetadata(string connectionString);

GenerateModel();
#>
2 changes: 1 addition & 1 deletion NuGet/CopyMe.MySql.tt.txt
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
Console.WriteLine(c.ContactName);
}

5. See more at https://github.com/linq2db/t4models/blob/master/Templates/ReadMe.LinqToDB.md.
5. See more at https://github.com/linq2db/t4models
*/

NamespaceName = "DataModels";
Expand Down
2 changes: 1 addition & 1 deletion NuGet/CopyMe.Oracle.Managed.tt.txt
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
Console.WriteLine(c.ContactName);
}

5. See more at https://github.com/linq2db/t4models/blob/master/Templates/ReadMe.LinqToDB.md.
5. See more at https://github.com/linq2db/t4models
*/

NamespaceName = "DataModels";
Expand Down
2 changes: 1 addition & 1 deletion NuGet/CopyMe.Oracle.x64.tt.txt
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
Console.WriteLine(c.ContactName);
}

5. See more at https://github.com/linq2db/t4models/blob/master/Templates/ReadMe.LinqToDB.md.
5. See more at https://github.com/linq2db/t4models
*/

NamespaceName = "DataModels";
Expand Down
2 changes: 1 addition & 1 deletion NuGet/CopyMe.Oracle.x86.tt.txt
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
Console.WriteLine(c.ContactName);
}

6. See more at https://github.com/linq2db/t4models/blob/master/Templates/ReadMe.LinqToDB.md.
6. See more at https://github.com/linq2db/t4models
*/

NamespaceName = "DataModels";
Expand Down
43 changes: 43 additions & 0 deletions NuGet/CopyMe.PostgreSQL.Core.tt.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
<#@ template language="C#" debug="True" hostSpecific="True" #>
<#@ output extension=".generated.cs" #>
<#@ include file=$(SolutionDir).tools\linq2db.t4models\LinqToDB.Templates\LinqToDB.PostgreSQL.Tools.ttinclude" #>
<#@ include file=$(SolutionDir).tools\linq2db.t4models\LinqToDB.Templates\PluralizationService.ttinclude" #>
<#
/*
1. Copy this file to a folder where you would like to generate your data model,
rename it, and delete .txt extension. For example:

MyProject
DataModels
MyDatabase.tt

2. Modify the connection settings below to connect to your database.

3. Add connection string to the web/app.config file:

<connectionStrings>
<add name="MyDatabase" connectionString="Server=MyServer;Port=5432;Database=MyDatabase;User Id=postgres;Password=TestPassword;Pooling=true;MinPoolSize=10;MaxPoolSize=100;Protocol=3;" providerName="PostgreSQL" />
</connectionStrings>

4. To access your database use the following code:

using (var db = new MyDatabaseDB())
{
var q =
from c in db.Customers
select c;

foreach (var c in q)
Console.WriteLine(c.ContactName);
}

5. See more at https://github.com/linq2db/t4models
*/

NamespaceName = "DataModels";

LoadPostgreSQLMetadata("MyServer", "5432", "MyDatabase", "postgres", "TestPassword");
// LoadPostgreSQLMetadata(string connectionString);

GenerateModel();
#>
2 changes: 1 addition & 1 deletion NuGet/CopyMe.PostgreSQL.tt.txt
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
Console.WriteLine(c.ContactName);
}

5. See more at https://github.com/linq2db/t4models/blob/master/Templates/ReadMe.LinqToDB.md.
5. See more at https://github.com/linq2db/t4models
*/

NamespaceName = "DataModels";
Expand Down
43 changes: 43 additions & 0 deletions NuGet/CopyMe.SQLite.Core.tt.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
<#@ template language="C#" debug="True" hostSpecific="True" #>
<#@ output extension=".generated.cs" #>
<#@ include file="$(SolutionDir).tools\linq2db.t4models\LinqToDB.Templates\LinqToDB.SQLite.Tools.ttinclude" #>
<#@ include file="$(SolutionDir).tools\linq2db.t4models\LinqToDB.Templates\PluralizationService.ttinclude" #>
<#
/*
1. Copy this file to a folder where you would like to generate your data model,
rename it, and delete .txt extension. For example:

MyProject
DataModels
MyDatabase.tt

2. Modify the connection settings below to connect to your database.

3. Add connection string to the web/app.config file:

<connectionStrings>
<add name="MyDatabase" connectionString="Data Source=MyDatabase.sqlite" providerName="SQLite" />
</connectionStrings>

4. To access your database use the following code:

using (var db = new MyDatabaseDB())
{
var q =
from c in db.Customers
select c;

foreach (var c in q)
Console.WriteLine(c.ContactName);
}

5. See more at https://github.com/linq2db/t4models
*/

NamespaceName = "DataModels";

LoadSQLiteMetadata(@"C:\Data", "MyDatabase.sqlite");
// LoadSQLiteMetadata(string connectionString);

GenerateModel();
#>
2 changes: 1 addition & 1 deletion NuGet/CopyMe.SQLite.tt.txt
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
Console.WriteLine(c.ContactName);
}

5. See more at https://github.com/linq2db/t4models/blob/master/Templates/ReadMe.LinqToDB.md.
5. See more at https://github.com/linq2db/t4models
*/

NamespaceName = "DataModels";
Expand Down
2 changes: 1 addition & 1 deletion NuGet/CopyMe.SapHana.tt.txt
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
Console.WriteLine(c.ContactName);
}

7. See more at https://github.com/linq2db/t4models/blob/master/Templates/ReadMe.LinqToDB.md.
7. See more at https://github.com/linq2db/t4models
*/

NamespaceName = "DataModels";
Expand Down
2 changes: 1 addition & 1 deletion NuGet/CopyMe.SqlCe.tt.txt
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
Console.WriteLine(c.ContactName);
}

5. See more at https://github.com/linq2db/t4models/blob/master/Templates/ReadMe.LinqToDB.md.
5. See more at https://github.com/linq2db/t4models
*/

NamespaceName = "DataModels";
Expand Down
54 changes: 54 additions & 0 deletions NuGet/CopyMe.SqlServer.Core.tt.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
<#@ template language="C#" debug="True" hostSpecific="True" #>
<#@ output extension=".generated.cs" #>
<#@ include file="$(SolutionDir).tools\linq2db.t4models\LinqToDB.Templates\LinqToDB.SqlServer.Tools.ttinclude" #>
<#@ include file="$(SolutionDir).tools\linq2db.t4models\LinqToDB.Templates\PluralizationService.ttinclude" #>
<#
/*
1. Copy this file to a folder where you would like to generate your data model,
rename it, and delete .txt extension. For example:

MyProject
DataModels
MyDatabase.tt

2. Modify the connection settings below to connect to your database.

3. Add connection string to the web/app.config file:

<connectionStrings>
<add name="MyDatabase" providerName="System.Data.SqlClient"
connectionString="Data Source=.;Database=MyDatabase;User Id=User;Password=TestPassword;" />
</connectionStrings>

4. To access your database use the following code:

using (var db = new MyDatabaseDB())
{
var q =
from c in db.Customers
select c;

foreach (var c in q)
Console.WriteLine(c.ContactName);
}

5. See more at https://github.com/linq2db/t4models

If you need to use the Microsoft.SqlServer.Types namespace, install the Microsoft.SqlServer.Types nuget,
and replace the following include at the top of this file:

"$(ProjectDir)LinqToDB.Templates\LinqToDB.SqlServer.Tools.ttinclude"

with

"$(ProjectDir)LinqToDB.Templates\LinqToDB.SqlServer.SqlTypes.Tools.ttinclude"
*/

NamespaceName = "DataModels";

LoadSqlServerMetadata("MyServer", "MyDatabase", "User", "Password");
// LoadSqlServerMetadata(".", "MyDatabase"); // Integrated Security
// LoadSqlServerMetadata(string connectionString);

GenerateModel();
#>
2 changes: 1 addition & 1 deletion NuGet/CopyMe.SqlServer.tt.txt
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
Console.WriteLine(c.ContactName);
}

5. See more at https://github.com/linq2db/t4models/blob/master/Templates/ReadMe.LinqToDB.md.
5. See more at https://github.com/linq2db/t4models

If you need to use the Microsoft.SqlServer.Types namespace, install the Microsoft.SqlServer.Types nuget,
and replace the following include at the top of this file:
Expand Down
2 changes: 1 addition & 1 deletion NuGet/CopyMe.Sybase.tt.txt
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
Console.WriteLine(c.ContactName);
}

7. See more at https://github.com/linq2db/t4models/blob/master/Templates/ReadMe.LinqToDB.md.
7. See more at https://github.com/linq2db/t4models
*/

NamespaceName = "DataModels";
Expand Down
2 changes: 1 addition & 1 deletion NuGet/CopyMe.tt.txt
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
Console.WriteLine(c.ContactName);
}

5. See more at https://github.com/linq2db/t4models/blob/master/Templates/ReadMe.LinqToDB.md.
5. See more at https://github.com/linq2db/t4models
*/

NamespaceName = "DataModel";
Expand Down
14 changes: 14 additions & 0 deletions NuGet/Init.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
param($installPath, $toolsPath, $package)

# get the active solution
$solution = Get-Interface $dte.Solution ([EnvDTE80.Solution2])
$solutionPath = [System.IO.Path]::GetDirectoryName($solution.FullName)
$linq2dbToolsPath = [System.IO.Path]::Combine($solutionPath, ".tools", "linq2db.t4models")
$linq2dbContentPath = [System.IO.Path]::Combine($installPath, "content")

# tools copy
xcopy $("$toolsPath\*.*") $("$linq2dbToolsPath\") /y /e

# content copy for .Net Core & similar projects
xcopy $("$linq2dbContentPath\*.*") $("$linq2dbToolsPath\") /y /e

2 changes: 1 addition & 1 deletion NuGet/Pack.bat
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
@rem cd ..\..\linq2db\Source
@rem call Compile.bat

cd ..\..\linq2db.t4models\ToolsGenerator
cd ..\ToolsGenerator

%windir%\Microsoft.NET\Framework\v4.0.30319\MSBuild.exe ToolsGenerator.csproj /property:Configuration=Release

Expand Down
Loading

0 comments on commit 69b9afe

Please sign in to comment.