Skip to content

Commit

Permalink
Updated GetStarted solution.
Browse files Browse the repository at this point in the history
  • Loading branch information
sdanyliv committed Jul 12, 2018
1 parent 8ebdff0 commit 395e518
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 10 deletions.
11 changes: 6 additions & 5 deletions SqlServer/GetStarted/App.config
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
<?xml version="1.0" encoding="utf-8" ?>
<?xml version="1.0" encoding="utf-8"?>

<configuration>
<connectionStrings>
<add name="MyDatabase" providerName="System.Data.SqlClient"
connectionString="Data Source=.;Database=Northwind;Integrated Security=SSPI;" />
</connectionStrings>
<connectionStrings>
<add name="MyDatabase" providerName="System.Data.SqlClient"
connectionString="Data Source=.;Database=Northwind;Integrated Security=SSPI;" />
</connectionStrings>
</configuration>
2 changes: 1 addition & 1 deletion SqlServer/GetStarted/DataModels/Northwind.generated.cs
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ namespace DataModel
/// <summary>
/// Database : Northwind
/// Data Source : DBHost\SQLSERVER2012
/// Server Version : 11.00.2100
/// Server Version : 11.00.2218
/// </summary>
public partial class NorthwindDB : LinqToDB.Data.DataConnection
{
Expand Down
7 changes: 7 additions & 0 deletions SqlServer/GetStarted/DataModels/Northwind.tt
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,13 @@
<#
NamespaceName = "DataModel";

// place optional configuration code here
// See https://linq2db.github.io/articles/Source/LinqToDB.Templates/README.html#configuring-generation-process

LoadSqlServerMetadata(@"DBHost\SQLSERVER2012", "Northwind", "sa", "TestPassword");

// Here you can customize table names, column name, column types.
// See https://linq2db.github.io/articles/Source/LinqToDB.Templates/README.html#customizing-generation-process

GenerateModel();
#>
6 changes: 2 additions & 4 deletions SqlServer/GetStarted/GetStarted.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,9 @@
</PropertyGroup>
<ItemGroup>
<Reference Include="linq2db, Version=1.0.2.0, Culture=neutral, PublicKeyToken=f19f8aed7feff67e, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>packages\linq2db.1.0.2\lib\net40\linq2db.dll</HintPath>
</Reference>
<Reference Include="Microsoft.SqlServer.Types, Version=11.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91, processorArchitecture=MSIL">
<Private>True</Private>
<HintPath>packages\Microsoft.SqlServer.Types.11.0.0\lib\net20\Microsoft.SqlServer.Types.dll</HintPath>
</Reference>
<Reference Include="System" />
Expand All @@ -59,6 +57,8 @@
</ItemGroup>
<ItemGroup>
<None Include="App.config" />
</ItemGroup>
<ItemGroup>
<None Include="LinqToDB.Templates\DataAnnotations.ttinclude" />
<None Include="LinqToDB.Templates\DataModel.ttinclude" />
<None Include="LinqToDB.Templates\EditableObject.ttinclude" />
Expand All @@ -81,8 +81,6 @@
<None Include="LinqToDB.Templates\T4Model.ttinclude" />
<None Include="LinqToDB.Templates\Validation.ttinclude" />
<None Include="packages.config" />
</ItemGroup>
<ItemGroup>
<None Include="README.md" />
<None Include="DataModels\Northwind.tt">
<Generator>TextTemplatingFileGenerator</Generator>
Expand Down

0 comments on commit 395e518

Please sign in to comment.