Skip to content
This repository was archived by the owner on Dec 23, 2017. It is now read-only.

Commit 55d40e5

Browse files
author
Ovan Crone
committed
Bringing Active Alias into parameter discovery as well.
1 parent af4dcbe commit 55d40e5

File tree

7 files changed

+15
-15
lines changed

7 files changed

+15
-15
lines changed

src/Susanoo.Core/Pipeline/Command/CommandExpression.cs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -505,27 +505,27 @@ public virtual IEnumerable<DbParameter> BuildPropertyParameters(IDatabaseManager
505505
_parameterInclusions.Select(p => p.Key).ToArray(),
506506
_parameterExclusions.ToArray());
507507

508-
foreach (var propInfo in implicitProperties.Keys)
508+
foreach (var propInfo in implicitProperties)
509509
{
510-
if (!_parameterExclusions.Contains(propInfo.Name))
510+
if (!_parameterExclusions.Contains(propInfo.Value.ActiveAlias))
511511
{
512512
var param = databaseManager.CreateParameter();
513513

514-
param.ParameterName = propInfo.Name;
514+
param.ParameterName = propInfo.Value.ActiveAlias;
515515
param.Direction = ParameterDirection.Input;
516516
#if !NETFX40
517-
param.Value = propInfo.GetValue(filter);
517+
param.Value = propInfo.Key.GetValue(filter);
518518
#else
519519
param.Value = propInfo.GetValue(filter, null);
520520
#endif
521521

522-
var type = CommandManager.GetDbType(propInfo.PropertyType);
522+
var type = CommandManager.GetDbType(propInfo.Key.PropertyType);
523523

524524
if (type.HasValue)
525525
param.DbType = type.Value;
526526

527527
Action<DbParameter> value;
528-
if (_parameterInclusions.TryGetValue(propInfo.Name, out value))
528+
if (_parameterInclusions.TryGetValue(propInfo.Value.ActiveAlias, out value))
529529
{
530530
if (value != null)
531531
{

src/Susanoo.Json/Susanoo.Json.csproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,9 +40,9 @@
4040
<SpecificVersion>False</SpecificVersion>
4141
<HintPath>..\packages\Newtonsoft.Json.6.0.8\lib\net45\Newtonsoft.Json.dll</HintPath>
4242
</Reference>
43-
<Reference Include="Susanoo.Core, Version=0.6.3.0, Culture=neutral, PublicKeyToken=0a505ce04f8a59d5, processorArchitecture=MSIL">
43+
<Reference Include="Susanoo.Core, Version=0.7.0.0, Culture=neutral, PublicKeyToken=0a505ce04f8a59d5, processorArchitecture=MSIL">
4444
<SpecificVersion>False</SpecificVersion>
45-
<HintPath>..\packages\Susanoo.Core.0.6.3.16\lib\net45\Susanoo.Core.dll</HintPath>
45+
<HintPath>..\packages\Susanoo.Core.0.7.0.20\lib\net45\Susanoo.Core.dll</HintPath>
4646
</Reference>
4747
<Reference Include="System" />
4848
<Reference Include="System.Core" />

src/Susanoo.Json/packages.config

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<packages>
33
<package id="Newtonsoft.Json" version="6.0.8" targetFramework="net45" />
4-
<package id="Susanoo.Core" version="0.6.3.16" targetFramework="net45" />
4+
<package id="Susanoo.Core" version="0.7.0.20" targetFramework="net45" />
55
</packages>

src/Susanoo.SqlServer.Tests/Susanoo.SqlServer.Tests.csproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,9 +52,9 @@
5252
<HintPath>..\packages\NUnitTestAdapter.1.2\lib\NUnit.VisualStudio.TestAdapter.dll</HintPath>
5353
<Private>False</Private>
5454
</Reference>
55-
<Reference Include="Susanoo.Core, Version=0.6.3.0, Culture=neutral, PublicKeyToken=0a505ce04f8a59d5, processorArchitecture=MSIL">
55+
<Reference Include="Susanoo.Core, Version=0.7.0.0, Culture=neutral, PublicKeyToken=0a505ce04f8a59d5, processorArchitecture=MSIL">
5656
<SpecificVersion>False</SpecificVersion>
57-
<HintPath>..\packages\Susanoo.Core.0.6.3.16\lib\net45\Susanoo.Core.dll</HintPath>
57+
<HintPath>..\packages\Susanoo.Core.0.7.0.20\lib\net45\Susanoo.Core.dll</HintPath>
5858
</Reference>
5959
<Reference Include="System" />
6060
<Reference Include="System.Core" />

src/Susanoo.SqlServer.Tests/packages.config

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,5 @@
33
<package id="Moq" version="4.2.1409.1722" targetFramework="net45" />
44
<package id="NUnit" version="2.6.4" targetFramework="net45" />
55
<package id="NUnitTestAdapter" version="1.2" targetFramework="net45" />
6-
<package id="Susanoo.Core" version="0.6.3.16" targetFramework="net45" />
6+
<package id="Susanoo.Core" version="0.7.0.20" targetFramework="net45" />
77
</packages>

src/Susanoo.SqlServer/Susanoo.SqlServer.csproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,9 +37,9 @@
3737
<AssemblyOriginatorKeyFile>Properties\Key.snk</AssemblyOriginatorKeyFile>
3838
</PropertyGroup>
3939
<ItemGroup>
40-
<Reference Include="Susanoo.Core, Version=0.6.3.0, Culture=neutral, PublicKeyToken=0a505ce04f8a59d5, processorArchitecture=MSIL">
40+
<Reference Include="Susanoo.Core, Version=0.7.0.0, Culture=neutral, PublicKeyToken=0a505ce04f8a59d5, processorArchitecture=MSIL">
4141
<SpecificVersion>False</SpecificVersion>
42-
<HintPath>..\packages\Susanoo.Core.0.6.3.16\lib\net45\Susanoo.Core.dll</HintPath>
42+
<HintPath>..\packages\Susanoo.Core.0.7.0.20\lib\net45\Susanoo.Core.dll</HintPath>
4343
</Reference>
4444
<Reference Include="System" />
4545
<Reference Include="System.Core" />
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="Susanoo.Core" version="0.6.3.16" targetFramework="net45" />
3+
<package id="Susanoo.Core" version="0.7.0.20" targetFramework="net45" />
44
</packages>

0 commit comments

Comments
 (0)