Skip to content

Commit 810378b

Browse files
committed
Fixed compilation errors
1 parent 947a0c2 commit 810378b

File tree

3 files changed

+25
-3
lines changed

3 files changed

+25
-3
lines changed

src/EntityFramework5.Npgsql/EntityFramework5.Npgsql.csproj

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,8 @@
6363
<Compile Include="..\EntityFramework6.Npgsql\Properties\AssemblyInfo.cs" />
6464
<Compile Include="..\EntityFramework6.Npgsql\Spatial\PostgisDataReader.cs" />
6565
<Compile Include="..\EntityFramework6.Npgsql\Spatial\PostgisServices.cs" />
66+
<Compile Include="..\EntityFramework6.Npgsql\SqlGenerators\CaseIsNullToCoalesceReducer.cs" />
67+
<Compile Include="..\EntityFramework6.Npgsql\SqlGenerators\DbExpressionDeepEqual.cs" />
6668
<Compile Include="..\EntityFramework6.Npgsql\SqlGenerators\PendingProjectsNode.cs" />
6769
<Compile Include="..\EntityFramework6.Npgsql\SqlGenerators\SqlBaseGenerator.cs" />
6870
<Compile Include="..\EntityFramework6.Npgsql\SqlGenerators\SqlDeleteGenerator.cs" />

src/EntityFramework6.Npgsql/SqlGenerators/CaseIsNullToCoalesceReducer.cs

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,21 @@
11
using System.Collections.Generic;
2-
using System.Data.Entity.Core.Common.CommandTrees;
3-
using System.Data.Entity.Core.Common.CommandTrees.ExpressionBuilder;
42
using System.Data.Entity.Core.Metadata.Edm;
53
using System.Linq;
4+
using System;
5+
using System.Collections.Generic;
6+
using System.Data.Common;
7+
using System.Data.Entity.Core.Common.CommandTrees.ExpressionBuilder;
8+
using System.Diagnostics;
9+
#if ENTITIES6
10+
using System.Globalization;
11+
using System.Data.Entity.Core.Common.CommandTrees;
12+
using System.Data.Entity.Core.Metadata.Edm;
13+
#else
14+
using System.Data.Common.CommandTrees;
15+
using System.Data.Metadata.Edm;
16+
#endif
17+
using JetBrains.Annotations;
18+
619

720
namespace Npgsql.SqlGenerators
821
{

src/EntityFramework6.Npgsql/SqlGenerators/DbExpressionDeepEqual.cs

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
using System.Data.Entity.Core.Common.CommandTrees;
2+
using System.Data.Entity.Core.Metadata.Edm;
23
using System.Linq;
34

45
namespace Npgsql.SqlGenerators
@@ -10,7 +11,7 @@ public static bool DeepEqual(DbExpression e1, DbExpression e2)
1011
if (e1.Equals(e2)) return true;
1112
if (e1.GetType() != e2.GetType()) return false;
1213
if (!e1.ExpressionKind.Equals(e2.ExpressionKind)) return false;
13-
if (!e1.ResultType.Equals(e2.ResultType)) return false;
14+
if (!DeepEqual(e1.ResultType,e2.ResultType)) return false;
1415

1516
if (e1 is DbFunctionExpression f1 && e2 is DbFunctionExpression f2)
1617
{
@@ -36,6 +37,12 @@ public static bool DeepEqual(DbExpression e1, DbExpression e2)
3637
return false;
3738
}
3839

40+
static bool DeepEqual(TypeUsage r1, TypeUsage r2)
41+
{
42+
if (r1.EdmType != r2.EdmType) return false;
43+
return true;
44+
}
45+
3946
private static bool DeepEqual(DbFunctionExpression f1, DbFunctionExpression f2)
4047
{
4148
if (!f1.Function.Name.Equals(f2.Function.Name)) return false;

0 commit comments

Comments
 (0)