Skip to content

Commit 19defc6

Browse files
EF version update
1 parent 496a1a8 commit 19defc6

File tree

10 files changed

+56
-17
lines changed

10 files changed

+56
-17
lines changed

EntityFramework.Utilities/EntityFramework.Utilities/App.config

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22
<configuration>
33
<configSections>
44
<section name="entityFramework" type="System.Data.Entity.Internal.ConfigFile.EntityFrameworkSection, EntityFramework, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false" />
5-
<!-- For more information on Entity Framework configuration, visit http://go.microsoft.com/fwlink/?LinkID=237468 -->
6-
</configSections>
5+
6+
<!-- For more information on Entity Framework configuration, visit http://go.microsoft.com/fwlink/?LinkID=237468 --></configSections>
77
<entityFramework>
88
<defaultConnectionFactory type="System.Data.Entity.Infrastructure.SqlConnectionFactory, EntityFramework">
99
<parameters>

EntityFramework.Utilities/EntityFramework.Utilities/EntityFramework.Utilities.csproj

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,10 +32,11 @@
3232
<ItemGroup>
3333
<Reference Include="EntityFramework, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089, processorArchitecture=MSIL">
3434
<SpecificVersion>False</SpecificVersion>
35-
<HintPath>..\packages\EntityFramework.6.0.2\lib\net40\EntityFramework.dll</HintPath>
35+
<HintPath>..\packages\EntityFramework.6.1.1\lib\net40\EntityFramework.dll</HintPath>
3636
</Reference>
37-
<Reference Include="EntityFramework.SqlServer">
38-
<HintPath>..\packages\EntityFramework.6.0.2\lib\net40\EntityFramework.SqlServer.dll</HintPath>
37+
<Reference Include="EntityFramework.SqlServer, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089, processorArchitecture=MSIL">
38+
<SpecificVersion>False</SpecificVersion>
39+
<HintPath>..\packages\EntityFramework.6.1.1\lib\net40\EntityFramework.SqlServer.dll</HintPath>
3940
</Reference>
4041
<Reference Include="System" />
4142
<Reference Include="System.ComponentModel.DataAnnotations" />
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="EntityFramework" version="6.0.2" targetFramework="net40" />
3+
<package id="EntityFramework" version="6.1.1" targetFramework="net40" />
44
</packages>

EntityFramework.Utilities/PerformanceTests/App.config

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22
<configuration>
33
<configSections>
44
<section name="entityFramework" type="System.Data.Entity.Internal.ConfigFile.EntityFrameworkSection, EntityFramework, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false" />
5-
<!-- For more information on Entity Framework configuration, visit http://go.microsoft.com/fwlink/?LinkID=237468 -->
6-
</configSections>
5+
6+
<!-- For more information on Entity Framework configuration, visit http://go.microsoft.com/fwlink/?LinkID=237468 --></configSections>
77
<entityFramework>
88
<defaultConnectionFactory type="System.Data.Entity.Infrastructure.SqlConnectionFactory, EntityFramework">
99
<parameters>

EntityFramework.Utilities/PerformanceTests/PerformanceTests.csproj

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,10 +34,11 @@
3434
<ItemGroup>
3535
<Reference Include="EntityFramework, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089, processorArchitecture=MSIL">
3636
<SpecificVersion>False</SpecificVersion>
37-
<HintPath>..\packages\EntityFramework.6.0.2\lib\net40\EntityFramework.dll</HintPath>
37+
<HintPath>..\packages\EntityFramework.6.1.1\lib\net40\EntityFramework.dll</HintPath>
3838
</Reference>
39-
<Reference Include="EntityFramework.SqlServer">
40-
<HintPath>..\packages\EntityFramework.6.0.2\lib\net40\EntityFramework.SqlServer.dll</HintPath>
39+
<Reference Include="EntityFramework.SqlServer, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089, processorArchitecture=MSIL">
40+
<SpecificVersion>False</SpecificVersion>
41+
<HintPath>..\packages\EntityFramework.6.1.1\lib\net40\EntityFramework.SqlServer.dll</HintPath>
4142
</Reference>
4243
<Reference Include="ServiceStack.Text">
4344
<HintPath>..\packages\ServiceStack.Text.3.8.3\lib\net35\ServiceStack.Text.dll</HintPath>
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>
3-
<package id="EntityFramework" version="6.0.2" targetFramework="net40" />
3+
<package id="EntityFramework" version="6.1.1" targetFramework="net40" />
44
<package id="ServiceStack.Text" version="3.8.3" />
55
</packages>

EntityFramework.Utilities/Tests/App.config

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
<section name="entityFramework" type="System.Data.Entity.Internal.ConfigFile.EntityFrameworkSection, EntityFramework, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false" />
55
<!-- For more information on Entity Framework configuration, visit http://go.microsoft.com/fwlink/?LinkID=237468 -->
66
<!-- For more information on Entity Framework configuration, visit http://go.microsoft.com/fwlink/?LinkID=237468 -->
7+
<!-- For more information on Entity Framework configuration, visit http://go.microsoft.com/fwlink/?LinkID=237468 -->
78
</configSections>
89
<entityFramework>
910
<defaultConnectionFactory type="System.Data.Entity.Infrastructure.SqlCeConnectionFactory, EntityFramework">
@@ -12,8 +13,8 @@
1213
</parameters>
1314
</defaultConnectionFactory>
1415
<providers>
15-
<provider invariantName="System.Data.SqlClient" type="System.Data.Entity.SqlServer.SqlProviderServices, EntityFramework.SqlServer" />
1616
<provider invariantName="System.Data.SqlServerCe.4.0" type="System.Data.Entity.SqlServerCompact.SqlCeProviderServices, EntityFramework.SqlServerCompact" />
17+
<provider invariantName="System.Data.SqlClient" type="System.Data.Entity.SqlServer.SqlProviderServices, EntityFramework.SqlServer" />
1718
</providers>
1819
</entityFramework>
1920
<runtime>

EntityFramework.Utilities/Tests/Tests.csproj

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,10 +37,11 @@
3737
<ItemGroup>
3838
<Reference Include="EntityFramework, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089, processorArchitecture=MSIL">
3939
<SpecificVersion>False</SpecificVersion>
40-
<HintPath>..\packages\EntityFramework.6.0.2\lib\net40\EntityFramework.dll</HintPath>
40+
<HintPath>..\packages\EntityFramework.6.1.1\lib\net40\EntityFramework.dll</HintPath>
4141
</Reference>
42-
<Reference Include="EntityFramework.SqlServer">
43-
<HintPath>..\packages\EntityFramework.6.0.2\lib\net40\EntityFramework.SqlServer.dll</HintPath>
42+
<Reference Include="EntityFramework.SqlServer, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089, processorArchitecture=MSIL">
43+
<SpecificVersion>False</SpecificVersion>
44+
<HintPath>..\packages\EntityFramework.6.1.1\lib\net40\EntityFramework.SqlServer.dll</HintPath>
4445
</Reference>
4546
<Reference Include="EntityFramework.SqlServerCompact">
4647
<HintPath>..\packages\EntityFramework.SqlServerCompact.6.0.2\lib\net40\EntityFramework.SqlServerCompact.dll</HintPath>

EntityFramework.Utilities/Tests/UpdateAllTest.cs

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,41 @@ public void UpdateAll_SetFromVariable()
7070
Assert.AreEqual(20, post.Reads);
7171
}
7272
}
73+
private int Get20()
74+
{
75+
return 20;
76+
}
77+
[TestMethod]
78+
public void UpdateAll_SetFromMethod()
79+
{
80+
SetupBasePosts();
81+
82+
int count;
83+
using (var db = Context.Sql())
84+
{
85+
count = EFBatchOperation.For(db, db.BlogPosts).Where(b => b.Title == "T2").Update(b => b.Reads, b => Get20());
86+
Assert.AreEqual(1, count);
87+
}
88+
89+
using (var db = Context.Sql())
90+
{
91+
var post = db.BlogPosts.First(p => p.Title == "T2");
92+
Assert.AreEqual(20, post.Reads);
93+
}
94+
}
95+
96+
[TestMethod]
97+
public void UpdateAll_SetFromProperty()
98+
{
99+
SetupBasePosts();
100+
101+
int count;
102+
using (var db = Context.Sql())
103+
{
104+
count = EFBatchOperation.For(db, db.BlogPosts).Where(b => b.Created == DateTime.Now.AddDays(2)).Update(b => b.Created, b => DateTime.Now);
105+
Assert.AreEqual(1, count);
106+
}
107+
}
73108

74109
[TestMethod]
75110
public void UpdateAll_ConcatStringValue()

EntityFramework.Utilities/Tests/packages.config

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<packages>
3-
<package id="EntityFramework" version="6.0.2" targetFramework="net40" />
3+
<package id="EntityFramework" version="6.1.1" targetFramework="net40" />
44
<package id="EntityFramework.SqlServerCompact" version="6.0.2" targetFramework="net40" />
55
<package id="Microsoft.SqlServer.Compact" version="4.0.8876.1" targetFramework="net40" />
66
<package id="ServiceStack.Text" version="3.8.3" />

0 commit comments

Comments
 (0)