Skip to content

Commit 0300a4e

Browse files
committed
Updated DataAccess with DataBooster package
1 parent fbe5ca5 commit 0300a4e

File tree

7 files changed

+21
-21
lines changed

7 files changed

+21
-21
lines changed

T4SQLTemplateLibrary/SqlBuilder/DataAccess/ConfigHelper.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ internal static int EnginePollInterval // milliseconds
1212
set { _EnginePollInterval = value; }
1313
}
1414

15-
static partial void ConfigInit()
15+
static partial void OnInitializing()
1616
{
1717
_ConnectionSettingKey = "T4SQLDB";
1818
_PackageSettingKey = "Engine_Package";

T4SQLTemplateLibrary/SqlBuilder/DataAccess/ConfigHelper.sample.cs

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,10 @@ namespace T4SQL.SqlBuilder.DataAccess
55
{
66
public static partial class ConfigHelper
77
{
8-
private static string _ConnectionSettingKey = "T4SQLDB";
9-
private static string _PackageSettingKey = "Engine_Package";
8+
#region Setting key names defined in your config file, can be overridden in partial OnInitializing()
9+
private static string _ConnectionSettingKey = "T4SQL.SqlBuilder.MainConnection";
10+
private static string _PackageSettingKey = "T4SQL.SqlBuilder.MainPackage";
11+
#endregion
1012

1113
#region Properties
1214
private static DbProviderFactory _DbProviderFactory;
@@ -30,7 +32,7 @@ public static string DatabasePackage
3032

3133
static ConfigHelper()
3234
{
33-
ConfigInit();
35+
OnInitializing();
3436

3537
#region Default Initialization
3638
ConnectionStringSettings connSetting = ConfigurationManager.ConnectionStrings[_ConnectionSettingKey];
@@ -41,8 +43,11 @@ static ConfigHelper()
4143
if (_DatabasePackage == null)
4244
_DatabasePackage = string.Empty;
4345
#endregion
46+
47+
OnInitialized();
4448
}
4549

46-
static partial void ConfigInit();
50+
static partial void OnInitializing();
51+
static partial void OnInitialized();
4752
}
4853
}

T4SQLTemplateLibrary/SqlBuilder/DataAccess/DbPackage.sample.cs

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,3 @@
1-
using System;
2-
using System.Data;
3-
using System.Data.Common;
4-
using System.Collections.Generic;
51
using DbParallel.DataAccess;
62

73
namespace T4SQL.SqlBuilder.DataAccess
Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
11
#if DEBUG
2-
using System;
3-
using DbParallel.DataAccess;
4-
using T4SQL.SqlBuilder.DataAccess;
2+
53
#endif

T4SQLTemplateLibrary/SqlBuilder/SqlBuilder.csproj

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,9 @@
3636
<WarningLevel>4</WarningLevel>
3737
</PropertyGroup>
3838
<ItemGroup>
39-
<Reference Include="DbParallel.DataAccess, Version=1.0.0.4, Culture=neutral, processorArchitecture=MSIL">
40-
<HintPath>..\packages\DataBooster.SqlServer.1.0.0.4\lib\net40-Client\DbParallel.DataAccess.dll</HintPath>
39+
<Reference Include="DbParallel.DataAccess, Version=1.0.0.5, Culture=neutral, processorArchitecture=MSIL">
40+
<SpecificVersion>False</SpecificVersion>
41+
<HintPath>..\packages\DataBooster.SqlServer.1.0.0.5\lib\net40-Client\DbParallel.DataAccess.dll</HintPath>
4142
</Reference>
4243
<Reference Include="System" />
4344
<Reference Include="System.configuration" />
Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<configuration>
3-
<connectionStrings>
4-
<add name="T4SQL.SqlBuilder.MainConnection" providerName="System.Data.SqlClient" connectionString="Data Source=.\SQLEXPRESS;Initial Catalog=T4SQLDB;Integrated Security=True" />
5-
<add name="T4SQL.SqlBuilder.MainConnection" providerName="System.Data.SqlClient" connectionString="Data Source=.\SQLEXPRESS;Initial Catalog=SAMPLEDB;Integrated Security=True" /></connectionStrings>
6-
<appSettings>
7-
<add key="T4SQL.SqlBuilder.MainPackage" value="T4SQL.ENGINE_" />
8-
<add key="T4SQL.SqlBuilder.MainPackage" value="SCHEMA.PACKAGE_" /></appSettings>
3+
<connectionStrings>
4+
<add name="T4SQL.SqlBuilder.MainConnection" providerName="System.Data.SqlClient" connectionString="Data Source=.\SQLEXPRESS;Initial Catalog=T4SQLDB;Integrated Security=True" />
5+
</connectionStrings>
6+
<appSettings>
7+
<add key="T4SQL.SqlBuilder.MainPackage" value="T4SQL.ENGINE_" />
8+
</appSettings>
99
</configuration>
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<packages>
3-
<package id="DataBooster.SqlServer" version="1.0.0.4" targetFramework="net40-Client" />
3+
<package id="DataBooster.SqlServer" version="1.0.0.5" targetFramework="net40-Client" />
44
</packages>

0 commit comments

Comments
 (0)