Skip to content

Commit

Permalink
Don't call Add-EFProvider or Add-EFDefaultConnectionFactory
Browse files Browse the repository at this point in the history
Part of #231
  • Loading branch information
bricelam committed Jun 29, 2019
1 parent 17bada0 commit 158d0cc
Show file tree
Hide file tree
Showing 7 changed files with 36 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,5 @@
<file src="../../artifacts/bin/EntityFramework.SqlServerCompact/$Configuration$/net45/EntityFramework.SqlServerCompact.dll" target="lib/net45/" />
<file src="../../artifacts/bin/EntityFramework.SqlServerCompact/$Configuration$/net45/EntityFramework.SqlServerCompact.xml" target="lib/net45/" />
<file src="content\**\*" target="content/" />
<file src="tools\**\*" target="tools/" />
</files>
</package>
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<configuration xmlns:xdt="http://schemas.microsoft.com/XML-Document-Transform">
<entityFramework>
<defaultConnectionFactory xdt:Transform="Remove" />
<defaultConnectionFactory type="System.Data.Entity.Infrastructure.SqlCeConnectionFactory, EntityFramework" xdt:Transform="Insert">
<parameters>
<parameter value="System.Data.SqlServerCe.4.0" />
</parameters>
</defaultConnectionFactory>
<providers>
<provider invariantName="System.Data.SqlServerCe.4.0" type="System.Data.Entity.SqlServerCompact.SqlCeProviderServices, EntityFramework.SqlServerCompact" xdt:Transform="InsertIfMissing" xdt:Locator="Match(invariantName)" />
</providers>
</entityFramework>
</configuration>
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<configuration xmlns:xdt="http://schemas.microsoft.com/XML-Document-Transform">
<entityFramework>
<defaultConnectionFactory xdt:Transform="Remove" />
<defaultConnectionFactory type="System.Data.Entity.Infrastructure.SqlCeConnectionFactory, EntityFramework" xdt:Transform="Insert">
<parameters>
<parameter value="System.Data.SqlServerCe.4.0" />
</parameters>
</defaultConnectionFactory>
<providers>
<provider invariantName="System.Data.SqlServerCe.4.0" type="System.Data.Entity.SqlServerCompact.SqlCeProviderServices, EntityFramework.SqlServerCompact" xdt:Transform="InsertIfMissing" xdt:Locator="Match(invariantName)" />
</providers>
</entityFramework>
</configuration>
4 changes: 0 additions & 4 deletions src/EntityFramework.SqlServerCompact/tools/install.ps1

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,9 @@
<section name="entityFramework" xdt:Transform="Remove" xdt:Locator="Match(name)" />
<section name="entityFramework" type="System.Data.Entity.Internal.ConfigFile.EntityFrameworkSection, EntityFramework, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false" xdt:Transform="Insert" xdt:Locator="Match(name)" />
</configSections>
<entityFramework xdt:Transform="InsertIfMissing">
<providers xdt:Transform="InsertIfMissing">
<provider invariantName="System.Data.SqlClient" type="System.Data.Entity.SqlServer.SqlProviderServices, EntityFramework.SqlServer" xdt:Transform="InsertIfMissing" xdt:Locator="Match(invariantName)" />
</providers>
</entityFramework>
</configuration>
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,9 @@
<section name="entityFramework" xdt:Transform="Remove" xdt:Locator="Match(name)" />
<section name="entityFramework" type="System.Data.Entity.Internal.ConfigFile.EntityFrameworkSection, EntityFramework, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false" xdt:Transform="Insert" xdt:Locator="Match(name)" />
</configSections>
<entityFramework xdt:Transform="InsertIfMissing">
<providers xdt:Transform="InsertIfMissing">
<provider invariantName="System.Data.SqlClient" type="System.Data.Entity.SqlServer.SqlProviderServices, EntityFramework.SqlServer" xdt:Transform="InsertIfMissing" xdt:Locator="Match(invariantName)" />
</providers>
</entityFramework>
</configuration>
2 changes: 0 additions & 2 deletions src/NuGet/EntityFramework/tools/install.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,5 @@ $project.Object.References |
?{ $_.Identity -eq 'System.Data.Entity' } |
%{ $_.Remove() }

Add-EFProvider $project 'System.Data.SqlClient' 'System.Data.Entity.SqlServer.SqlProviderServices, EntityFramework.SqlServer'

Write-Host
Write-Host "Type 'get-help EntityFramework' to see all available Entity Framework commands."

0 comments on commit 158d0cc

Please sign in to comment.