Skip to content

Commit 4959f03

Browse files
committed
Use Effort.EF6 instead of SqlServerCompact (Sql server compact is not compatible with .net core).
1 parent b672038 commit 4959f03

File tree

5 files changed

+6
-41
lines changed

5 files changed

+6
-41
lines changed

Directory.Build.props

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,8 @@
55
<EFVersion>6.1.3</EFVersion>
66
<FluentAssertions>4.15.0</FluentAssertions>
77
<TestSDKVersion>15.5.0</TestSDKVersion>
8-
<xUnitVersion>2.3.1</xUnitVersion>
9-
<SqlServerCompactVersion>4.0.8876.1</SqlServerCompactVersion>
8+
<xUnitVersion>2.4.1</xUnitVersion>
9+
<EffortVersion>2.2.1</EffortVersion>
1010
</PropertyGroup>
11+
1112
</Project>

src/AutoMapper.Collection.EntityFramework.Tests/App.config

Lines changed: 0 additions & 24 deletions
This file was deleted.

src/AutoMapper.Collection.EntityFramework.Tests/AutoMapper.Collection.EntityFramework.Tests.csproj

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -10,18 +10,12 @@
1010
<ProjectReference Include="..\AutoMapper.Collection.EntityFramework\AutoMapper.Collection.EntityFramework.csproj" />
1111
</ItemGroup>
1212

13-
<ItemGroup Condition=" '$(TargetFramework)' == 'net461' ">
14-
<Reference Include="System" />
15-
<Reference Include="Microsoft.CSharp" />
16-
</ItemGroup>
17-
1813
<ItemGroup>
1914
<PackageReference Include="FluentAssertions" Version="$(FluentAssertions)" />
2015
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="$(TestSDKVersion)" />
2116
<PackageReference Include="xunit" Version="$(xUnitVersion)" />
2217
<PackageReference Include="xunit.runner.visualstudio" Version="$(xUnitVersion)" />
23-
<PackageReference Include="EntityFramework.SqlServerCompact" Version="$(EfVersion)" />
24-
<PackageReference Include="Microsoft.SqlServer.Compact" Version="$(SqlServerCompactVersion)" />
18+
<PackageReference Include="Effort.EF6" Version="$(EffortVersion)" />
2519
</ItemGroup>
2620

2721
<ItemGroup>

src/AutoMapper.Collection.EntityFramework.Tests/EntityFramworkTests.cs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
using System;
22
using System.Collections.Generic;
33
using System.Data.Entity;
4-
using System.Data.SqlServerCe;
54
using System.Linq;
65
using AutoMapper.EntityFramework;
76
using AutoMapper.EquivalencyExpression;
@@ -69,7 +68,7 @@ public void Should_Persist_To_Insert()
6968
public class DB : DbContext
7069
{
7170
public DB()
72-
: base(new SqlCeConnection($"Data Source={Guid.NewGuid()}.sdf;Persist Security Info=False;"), contextOwnsConnection: true)
71+
: base(Effort.DbConnectionFactory.CreateTransient(), contextOwnsConnection: true)
7372
{
7473
Things.RemoveRange(Things);
7574
SaveChanges();

src/AutoMapper.Collection.EntityFramework/AutoMapper.Collection.EntityFramework.csproj

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<PropertyGroup>
44
<Description>Collection updating support for EntityFramework with AutoMapper. Extends DBSet&lt;T&gt; with Persist&lt;TDto&gt;().InsertUpdate(dto) and Persist&lt;TDto&gt;().Delete(dto). Will find the matching object and will Insert/Update/Delete.</Description>
55
<Authors>Tyler Carlson</Authors>
6-
<TargetFramework>net461</TargetFramework>
6+
<TargetFrameworks>net461</TargetFrameworks>
77
<AssemblyName>AutoMapper.Collection.EntityFramework</AssemblyName>
88
<PackageId>AutoMapper.Collection.EntityFramework</PackageId>
99
<PackageIconUrl>https://s3.amazonaws.com/automapper/icon.png</PackageIconUrl>
@@ -23,9 +23,4 @@
2323
<PackageReference Include="EntityFramework" Version="$(EfVersion)" />
2424
</ItemGroup>
2525

26-
<ItemGroup Condition=" '$(TargetFramework)' == 'net45' ">
27-
<Reference Include="System" />
28-
<Reference Include="Microsoft.CSharp" />
29-
</ItemGroup>
30-
3126
</Project>

0 commit comments

Comments
 (0)