Skip to content

Update to .Net6 #131

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 39 commits into from
Dec 8, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
39 commits
Select commit Hold shift + click to select a range
4262400
net 6 update
ChrisJollyAU Dec 13, 2021
de09de2
update dependencies
ChrisJollyAU Sep 26, 2022
1f35ab8
merge fixes from upstream
ChrisJollyAU Sep 26, 2022
7dd239b
add compile fixes from upstream changes
ChrisJollyAU Sep 26, 2022
ca0feb4
Add extension methods for the Fluent API IsClustered. Mainly for cros…
ChrisJollyAU Sep 27, 2022
b533695
SqlExpressionFactory can't be used inside SqlGenerator so create the …
ChrisJollyAU Sep 29, 2022
ed8f109
update tests to build
ChrisJollyAU Sep 29, 2022
4eb1b0c
Rewrite the COALESCE function into a form access can understand
ChrisJollyAU Oct 1, 2022
0bc5d04
According to convention, if the property is the primary key and it is…
ChrisJollyAU Oct 1, 2022
d42cf1e
Fix tests: Use helper method to create connection - will use database…
ChrisJollyAU Oct 1, 2022
410ccb0
Add in support for .Parse methods on the simple types that support it…
ChrisJollyAU Oct 1, 2022
b062405
Fix check for correct type that this handles. Previous way of checkin…
ChrisJollyAU Oct 2, 2022
ed726d7
[Fix]: Explicitly find DateTime in an IN expression and use the Jet f…
ChrisJollyAU Oct 2, 2022
2f2de12
enable and fix tests
ChrisJollyAU Oct 5, 2022
5341e45
Add translator for Jet Random
ChrisJollyAU Oct 5, 2022
d51935d
[Fix][Test]: Exception can be either OleDb or Odbc
ChrisJollyAU Oct 6, 2022
ee87572
Fix schema query: the ondelete and onupdate were added in the wrong o…
ChrisJollyAU Oct 7, 2022
093890f
[Fix]: Don't update the command to the trim'd version. If using an in…
ChrisJollyAU Oct 7, 2022
58f0918
[Fix]: Use TryGetDefaultValue.. For an int property, GetDefaultValue …
ChrisJollyAU Oct 7, 2022
b78bbec
Do not generate SavePoint SQL. No-op
ChrisJollyAU Oct 8, 2022
adbad89
Fix check for unique
ChrisJollyAU Oct 8, 2022
ae21d83
Fix getting the schema for relations. Need both adox and DAO to get a…
ChrisJollyAU Oct 8, 2022
ef5c33c
[Fix]: No need for fancy conversion if there is a conversion expressi…
ChrisJollyAU Oct 8, 2022
d100231
[Tests]: Update tests
ChrisJollyAU Oct 8, 2022
81f6cbb
revert to use our stringtypemapping to generate the sql literal. Some…
ChrisJollyAU Oct 10, 2022
9843c0c
Update DesignTimeService for Net 6
ChrisJollyAU Oct 10, 2022
ab7a424
Fix up Design time services to work properly. Add-Migration command i…
ChrisJollyAU Oct 12, 2022
fc6b407
Update version info for message for required OleDb and Odbc dependencies
ChrisJollyAU Oct 13, 2022
b72b0ae
Support casting to Int64
ChrisJollyAU Oct 15, 2022
05b10ea
Type MApping: a long gets mapped to integer in Jet
ChrisJollyAU Oct 15, 2022
4554aad
Update the translator for the string methods to add a couple more: Su…
ChrisJollyAU Oct 15, 2022
8135a01
Update Northwind SQL: Use a better format for the dates. When using i…
ChrisJollyAU Oct 18, 2022
cf4bbf2
Update tests
ChrisJollyAU Oct 18, 2022
e446bce
Upgrade to latest dependencies
ChrisJollyAU Oct 18, 2022
75e381b
Update tests
ChrisJollyAU Oct 23, 2022
ca1b158
Update tests
ChrisJollyAU Nov 7, 2022
59bc0d8
Change option from 0 to 1 for InStr. Make it use vbTextCompare which …
ChrisJollyAU Nov 23, 2022
e14b48d
Update tests
ChrisJollyAU Dec 6, 2022
4219015
raw string literals not supported in net6
ChrisJollyAU Dec 7, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
52 changes: 26 additions & 26 deletions Dependencies.targets
Original file line number Diff line number Diff line change
@@ -1,34 +1,34 @@
<Project>
<PropertyGroup>
<DotnetRuntimeVersion>5.0.14</DotnetRuntimeVersion>
<EFCoreVersion>[$(DotnetRuntimeVersion), 6.0.0)</EFCoreVersion>
<DotnetRuntimeVersion>6.0.10</DotnetRuntimeVersion>
<EFCoreVersion>[$(DotnetRuntimeVersion), 7.0.0)</EFCoreVersion>
</PropertyGroup>

<ItemGroup>
<!-- Common -->
<PackageReference Update="Microsoft.Extensions.Configuration.EnvironmentVariables" Version="5.0.0" />
<PackageReference Update="Microsoft.Extensions.Configuration.Json" Version="5.0.0" />
<PackageReference Update="Microsoft.Extensions.Caching.Memory" Version="5.0.0" />
<PackageReference Update="Microsoft.Extensions.Configuration.EnvironmentVariables" Version="6.0.1" />
<PackageReference Update="Microsoft.Extensions.Configuration.Json" Version="6.0.0" />
<PackageReference Update="Microsoft.Extensions.Caching.Memory" Version="6.0.0" />
<PackageReference Update="Microsoft.EntityFrameworkCore" Version="$(EFCoreVersion)" />
<PackageReference Update="Microsoft.EntityFrameworkCore.Relational" Version="$(EFCoreVersion)" />
<PackageReference Update="System.Diagnostics.DiagnosticSource" Version="5.0.1" />
<PackageReference Update="System.Diagnostics.DiagnosticSource" Version="6.0.0" />
<PackageReference Update="Microsoft.CodeAnalysis.FxCopAnalyzers" Version="3.0.0" />
<PackageReference Update="DotNetAnalyzers.DocumentationAnalyzers" Version="1.0.0-beta.59" />
<PackageReference Update="Microsoft.SourceLink.GitHub" Version="1.1.1" />

<!-- EntityFrameworkCore.Jet.Data -->
<PackageReference Update="System.ValueTuple" Version="4.5.0" />
<PackageReference Update="Microsoft.CSharp" Version="4.7.0" />
<PackageReference Update="Microsoft.Win32.Registry" Version="5.0.0" />
<PackageReference Update="Microsoft.Win32.Registry" Version="6.0.0-preview.5.21301.5" />

<!-- EFCore.Jet -->
<PackageReference Update="Microsoft.Extensions.DependencyInjection" Version="5.0.2" />
<PackageReference Update="Microsoft.Extensions.Configuration" Version="5.0.0" />
<PackageReference Update="Microsoft.Extensions.Logging" Version="5.0.0" />
<PackageReference Update="Microsoft.Bcl.AsyncInterfaces" Version="5.0.0" />
<PackageReference Update="Microsoft.Extensions.DependencyInjection" Version="5.0.1" />
<PackageReference Update="Microsoft.Extensions.Configuration" Version="6.0.0" />
<PackageReference Update="Microsoft.Extensions.Logging" Version="6.0.0" />
<PackageReference Update="Microsoft.Bcl.AsyncInterfaces" Version="6.0.0" />
<PackageReference Update="Microsoft.Bcl.HashCode" Version="1.1.1" />
<PackageReference Update="System.Collections.Immutable" Version="5.0.0" />
<PackageReference Update="System.ComponentModel.Annotations" Version="5.0.0" />
<PackageReference Update="System.Collections.Immutable" Version="6.0.0" />
<PackageReference Update="System.ComponentModel.Annotations" Version="6.0.0" />
<!--<PackageReference Update="Microsoft.EntityFrameworkCore" Version="$(MicrosoftEntityFrameworkCoreVersion)" />-->
<!--<PackageReference Update="Microsoft.EntityFrameworkCore.Relational" Version="$(MicrosoftEntityFrameworkCoreRelationalVersion)" />-->
<!--<PackageReference Update="Microsoft.Extensions.Configuration.Json" Version="$(MicrosoftExtensionsConfigurationJsonVersion)" />-->
Expand All @@ -37,13 +37,13 @@
<!--<PackageReference Update="System.Diagnostics.DiagnosticSource" Version="$(SystemDiagnosticsDiagnosticSourceVersion)" />-->

<!-- Tests -->
<PackageReference Update="System.Data.Odbc" Version="5.0.0" />
<PackageReference Update="System.Data.OleDb" Version="5.0.0" />
<PackageReference Update="System.Data.Odbc" Version="6.0.1" />
<PackageReference Update="System.Data.OleDb" Version="6.0.0" />
<PackageReference Update="Microsoft.EntityFrameworkCore.Design" Version="$(EFCoreVersion)" />
<PackageReference Update="Microsoft.EntityFrameworkCore.Relational.Specification.Tests" Version="$(EFCoreVersion)" />
<PackageReference Update="Microsoft.NET.Test.Sdk" Version="17.0.0" />
<PackageReference Update="MSTest.TestAdapter" Version="2.2.8" />
<PackageReference Update="MSTest.TestFramework" Version="2.2.8" />
<PackageReference Update="Microsoft.NET.Test.Sdk" Version="17.3.2" />
<PackageReference Update="MSTest.TestAdapter" Version="2.2.10" />
<PackageReference Update="MSTest.TestFramework" Version="2.2.10" />
<PackageReference Update="coverlet.collector" Version="3.1.2" />
<PackageReference Update="Newtonsoft.Json" Version="13.0.1" />

Expand All @@ -56,11 +56,11 @@
<!--<PackageReference Update="coverlet.collector" Version="$(CoverletCollector)" />-->

<!-- EFCore.Jet.FunctionalTests -->
<PackageReference Update="xunit.core" Version="2.4.1" />
<PackageReference Update="xunit.assert" Version="2.4.1" />
<PackageReference Update="xunit.runner.visualstudio" Version="2.4.3" />
<PackageReference Update="xunit.runner.console" Version="2.4.1" />
<PackageReference Update="Microsoft.Extensions.Configuration.FileExtensions" Version="5.0.0" />
<PackageReference Update="xunit.core" Version="2.4.2" />
<PackageReference Update="xunit.assert" Version="2.4.2" />
<PackageReference Update="xunit.runner.visualstudio" Version="2.4.5" />
<PackageReference Update="xunit.runner.console" Version="2.4.2" />
<PackageReference Update="Microsoft.Extensions.Configuration.FileExtensions" Version="6.0.0" />
<!--<PackageReference Update="Microsoft.Extensions.Configuration.EnvironmentVariables" Version="$(MicrosoftExtensionsConfigurationEnvironmentVariablesVersion)" />-->
<!--<PackageReference Update="Microsoft.Extensions.Configuration.Json" Version="$(MicrosoftExtensionsConfigurationJsonVersion)" />-->
<!--<PackageReference Update="System.Data.Odbc" Version="$(SystemDataOdbcVersion)" />-->
Expand All @@ -81,9 +81,9 @@
<!--<PackageReference Update="coverlet.collector" Version="$(CoverletCollector)" />-->

<!-- EFCore.Jet.Tests -->
<PackageReference Update="Microsoft.CodeAnalysis.CSharp" Version="4.0.1" />
<PackageReference Update="Microsoft.Extensions.DependencyModel" Version="5.0.0" />
<PackageReference Update="Moq" Version="4.16.1" />
<PackageReference Update="Microsoft.CodeAnalysis.CSharp" Version="4.3.1" />
<PackageReference Update="Microsoft.Extensions.DependencyModel" Version="6.0.0" />
<PackageReference Update="Moq" Version="4.18.2" />
<!--<PackageReference Update="Microsoft.EntityFrameworkCore.Design" Version="$(MicrosoftEntityFrameworkCoreDesignVersion)" />-->
<!--<PackageReference Update="Microsoft.EntityFrameworkCore.Relational" Version="$(MicrosoftEntityFrameworkCoreRelationalVersion)" />-->
<!--<PackageReference Update="Microsoft.EntityFrameworkCore.Relational.Specification.Tests" Version="$(MicrosoftEntityFrameworkCoreRelationalSpecificationTestsVersion)" />-->
Expand Down
6 changes: 3 additions & 3 deletions Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@
</PropertyGroup>

<PropertyGroup>
<DefaultNetCoreTargetFramework>net5.0</DefaultNetCoreTargetFramework>
<WindowsOnlyNetCoreTargetFramework>net5.0-windows</WindowsOnlyNetCoreTargetFramework>
<DefaultNetCoreLegacyTargetFramework>netcoreapp5.0</DefaultNetCoreLegacyTargetFramework>
<DefaultNetCoreTargetFramework>net6.0</DefaultNetCoreTargetFramework>
<WindowsOnlyNetCoreTargetFramework>net6.0-windows</WindowsOnlyNetCoreTargetFramework>
<DefaultNetCoreLegacyTargetFramework>netcoreapp6.0</DefaultNetCoreLegacyTargetFramework>
<DefaultNetStandardTargetFramework>netstandard2.1</DefaultNetStandardTargetFramework>
</PropertyGroup>

Expand Down
36 changes: 18 additions & 18 deletions EFCore.Jet.sln
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 16
VisualStudioVersion = 16.0.29806.167
# Visual Studio Version 17
VisualStudioVersion = 17.4.32916.344
MinimumVisualStudioVersion = 10.0.40219.1
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{F68095EE-6CD1-43A2-B498-6CA72CE2A0CB}"
ProjectSection(SolutionItems) = preProject
Expand Down Expand Up @@ -30,18 +30,18 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "docs", "docs", "{B7FF1850-2
EndProjectSection
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "root", "root", "{76210BB4-A506-4838-8BBF-57DA18C8FA03}"
ProjectSection(SolutionItems) = preProject
Directory.Build.props = Directory.Build.props
NuGet.Config = NuGet.Config
Directory.Build.targets = Directory.Build.targets
global.json = global.json
Dependencies.targets = Dependencies.targets
Version.props = Version.props
Development.props = Development.props
Development.props.sample = Development.props.sample
Key.snk = Key.snk
docs\README.md = docs\README.md
EndProjectSection
ProjectSection(SolutionItems) = preProject
Dependencies.targets = Dependencies.targets
Development.props = Development.props
Development.props.sample = Development.props.sample
Directory.Build.props = Directory.Build.props
Directory.Build.targets = Directory.Build.targets
global.json = global.json
Key.snk = Key.snk
NuGet.Config = NuGet.Config
docs\README.md = docs\README.md
Version.props = Version.props
EndProjectSection
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "EFCore.Jet.Tests", "test\EFCore.Jet.Tests\EFCore.Jet.Tests.csproj", "{770A076B-A448-499C-BB86-A37994C04523}"
EndProject
Expand All @@ -52,9 +52,9 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tools", "tools", "{84E4151A
tools\Resources.tt = tools\Resources.tt
EndProjectSection
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "EFCore.Jet.Odbc", "src\EFCore.Jet.Odbc\EFCore.Jet.Odbc.csproj", "{1E0729DA-B861-46EA-B1F1-3AE20EA1E00A}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "EFCore.Jet.Odbc", "src\EFCore.Jet.Odbc\EFCore.Jet.Odbc.csproj", "{1E0729DA-B861-46EA-B1F1-3AE20EA1E00A}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "EFCore.Jet.OleDb", "src\EFCore.Jet.OleDb\EFCore.Jet.OleDb.csproj", "{FFC89A2D-F68F-47E3-BA00-47E9C0BEDB71}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "EFCore.Jet.OleDb", "src\EFCore.Jet.OleDb\EFCore.Jet.OleDb.csproj", "{FFC89A2D-F68F-47E3-BA00-47E9C0BEDB71}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Expand Down Expand Up @@ -130,8 +130,8 @@ Global
{770A076B-A448-499C-BB86-A37994C04523}.Debug|Any CPU.Build.0 = Debug|Any CPU
{770A076B-A448-499C-BB86-A37994C04523}.Debug|x64.ActiveCfg = Debug|Any CPU
{770A076B-A448-499C-BB86-A37994C04523}.Debug|x64.Build.0 = Debug|Any CPU
{770A076B-A448-499C-BB86-A37994C04523}.Debug|x86.ActiveCfg = Debug|Any CPU
{770A076B-A448-499C-BB86-A37994C04523}.Debug|x86.Build.0 = Debug|Any CPU
{770A076B-A448-499C-BB86-A37994C04523}.Debug|x86.ActiveCfg = Debug|x86
{770A076B-A448-499C-BB86-A37994C04523}.Debug|x86.Build.0 = Debug|x86
{770A076B-A448-499C-BB86-A37994C04523}.Release|Any CPU.ActiveCfg = Release|Any CPU
{770A076B-A448-499C-BB86-A37994C04523}.Release|Any CPU.Build.0 = Release|Any CPU
{770A076B-A448-499C-BB86-A37994C04523}.Release|x64.ActiveCfg = Release|Any CPU
Expand Down
2 changes: 1 addition & 1 deletion Version.props
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
- "rtm"
- "servicing"
-->
<VersionPrefix>5.0.0</VersionPrefix>
<VersionPrefix>6.0.0</VersionPrefix>
<PreReleaseVersionLabel>alpha</PreReleaseVersionLabel>
<PreReleaseVersionIteration>1</PreReleaseVersionIteration>

Expand Down
2 changes: 1 addition & 1 deletion global.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"sdk": {
"version": "5.0.405",
"version": "6.0.403",
"allowPrerelease": false,
"rollForward": "latestFeature"
}
Expand Down
2 changes: 1 addition & 1 deletion src/EFCore.Jet.Data/AdoxSchema.cs
Original file line number Diff line number Diff line change
Expand Up @@ -424,8 +424,8 @@ public override DataTable GetRelations()
referencingTableName,
principalTableName,
relationType,
onUpdate,
onDelete,
onUpdate,
isEnforced,
isInherited);
}
Expand Down
29 changes: 28 additions & 1 deletion src/EFCore.Jet.Data/DaoSchema.cs
Original file line number Diff line number Diff line change
Expand Up @@ -435,8 +435,8 @@ public override DataTable GetRelations()
referencingTableName,
principalTableName,
relationType,
onUpdate,
onDelete,
onUpdate,
isEnforced,
isInherited);
}
Expand Down Expand Up @@ -682,6 +682,33 @@ protected static Dictionary<string, object> GetProperties(dynamic properties)
return ordinalPositions;
}

public Dictionary<string,(string relationType,bool isEnforced,bool isInherited)> GetRelationTypes()
{
var result = new Dictionary<string, (string,bool,bool)>();
using var relations = _database.Relations;
var relationCount = (int)relations.Count;

for (var i = 0; i < relationCount; i++)
{
using var relation = relations[i];

var relationName = (string)relation.Name;
var attributes = (RelationAttributeEnum)relation.Attributes;

var relationType = (attributes & RelationAttributeEnum.dbRelationUnique) == RelationAttributeEnum.dbRelationUnique
? "ONE"
: "MANY";

var isEnforced = (attributes & RelationAttributeEnum.dbRelationDontEnforce) != RelationAttributeEnum.dbRelationDontEnforce;

var isInherited = (attributes & RelationAttributeEnum.dbRelationInherited) != RelationAttributeEnum.dbRelationInherited;

result.Add(relationName, (relationType,isEnforced,isInherited));
}

return result;
}

public override void Dispose()
{
_database.Dispose();
Expand Down
2 changes: 1 addition & 1 deletion src/EFCore.Jet.Data/EFCore.Jet.Data.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<PropertyGroup>
<Description>Jet/ACE data provider for .NET used by EntityFramworkCore.Jet (Microsoft Access MDB/ACCDB files).</Description>
<TargetFramework>$(DefaultNetStandardTargetFramework)</TargetFramework>
<TargetFramework>net6.0-windows</TargetFramework>
<Platforms>AnyCPU;x86;x64</Platforms>
<AssemblyName>EntityFrameworkCore.Jet.Data</AssemblyName>
<RootNamespace>EntityFrameworkCore.Jet.Data</RootNamespace>
Expand Down
1 change: 0 additions & 1 deletion src/EFCore.Jet.Data/JetCommand.cs
Original file line number Diff line number Diff line change
Expand Up @@ -398,7 +398,6 @@ protected virtual IReadOnlyList<JetCommand> SplitCommands()
var commandText = CommandText.Trim();
if (!string.IsNullOrEmpty(commandText))
{
CommandText = commandText;
commands.Add(this);
}
}
Expand Down
4 changes: 2 additions & 2 deletions src/EFCore.Jet.Data/JetFactory.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ namespace EntityFrameworkCore.Jet.Data
/// </summary>
public class JetFactory : DbProviderFactory
{
public static readonly Version MinimumRequiredOdbcVersion = new Version(5, 0, 0);
public static readonly Version MinimumRequiredOleDbVersion = new Version(5, 0, 0);
public static readonly Version MinimumRequiredOdbcVersion = new Version(6, 0, 0);
public static readonly Version MinimumRequiredOleDbVersion = new Version(6, 0, 0);

public static readonly JetFactory Instance = new JetFactory(null, null);

Expand Down
26 changes: 23 additions & 3 deletions src/EFCore.Jet.Data/PreciseSchema.cs
Original file line number Diff line number Diff line change
Expand Up @@ -49,13 +49,33 @@ public override DataTable GetIndexes()
=> _adoxSchema.Value.GetIndexes(); // either ADOX or DAO is fine

public override DataTable GetIndexColumns()
=> _daoSchema.Value.GetIndexColumns(); // either ADOX or DAO is fine
=> _adoxSchema.Value.GetIndexColumns(); // either ADOX or DAO is fine

//ADOX can get more detail for the onupdate and ondelete rules (set null and set default)
//DAO can get the relation type (1 to 1 or 1 to many)
//DAO can get isenforced and isherited
public override DataTable GetRelations()
=> _daoSchema.Value.GetRelations(); // either ADOX or DAO is fine
{
var dataTable = _adoxSchema.Value.GetRelations();
var reltypes = _daoSchema.Value.GetRelationTypes();

foreach (DataRow row in dataTable.Rows)
{
var relationName = (string)row["RELATION_NAME"];

if (reltypes.TryGetValue(relationName, out var relationType))
{
row["RELATION_TYPE"] = relationType.relationType;
row["IS_ENFORCED"] = relationType.isEnforced;
row["IS_INHERITED"] = relationType.isInherited;
}
}
dataTable.AcceptChanges();
return dataTable;
}

public override DataTable GetRelationColumns()
=> _daoSchema.Value.GetRelationColumns(); // either ADOX or DAO is fine
=> _adoxSchema.Value.GetRelationColumns(); // either ADOX or DAO is fine

public override DataTable GetCheckConstraints()
=> _adoxSchema.Value.GetCheckConstraints(); // DAO does not support CHECK CONSTRAINTs, but ADOX does
Expand Down
2 changes: 1 addition & 1 deletion src/EFCore.Jet.Odbc/EFCore.Jet.Odbc.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<PropertyGroup>
<Description>Explicit ODBC support for Jet/ACE database provider for Entity Framework Core (Microsoft Access MDB/ACCDB files).</Description>
<TargetFramework>$(WindowsOnlyNetCoreTargetFramework)</TargetFramework>
<TargetFramework>net6.0-windows</TargetFramework>
<AssemblyName>EntityFrameworkCore.Jet.Odbc</AssemblyName>
<RootNamespace>EntityFrameworkCore.Jet</RootNamespace>
<PackageTags>$(PackageTags);ODBC;System.Data.Odbc</PackageTags>
Expand Down
2 changes: 1 addition & 1 deletion src/EFCore.Jet.OleDb/EFCore.Jet.OleDb.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<PropertyGroup>
<Description>Explicit OLE DB support for Jet/ACE database provider for Entity Framework Core (Microsoft Access MDB/ACCDB files).</Description>
<TargetFramework>$(WindowsOnlyNetCoreTargetFramework)</TargetFramework>
<TargetFramework>net6.0-windows</TargetFramework>
<AssemblyName>EntityFrameworkCore.Jet.OleDb</AssemblyName>
<RootNamespace>EntityFrameworkCore.Jet</RootNamespace>
<PackageTags>$(PackageTags);OLE DB;OLEDB;System.Data.OleDb</PackageTags>
Expand Down
19 changes: 12 additions & 7 deletions src/EFCore.Jet/Design/Internal/JetDesignTimeServices.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,9 @@
using EntityFrameworkCore.Jet.Internal;
using EntityFrameworkCore.Jet.Scaffolding.Internal;
using EntityFrameworkCore.Jet.Storage.Internal;
using EntityFrameworkCore.Jet.Update.Internal;
using Microsoft.EntityFrameworkCore.Design;
using Microsoft.EntityFrameworkCore.Design.Internal;
using Microsoft.EntityFrameworkCore.Diagnostics;
using Microsoft.EntityFrameworkCore.Scaffolding;
using Microsoft.EntityFrameworkCore.Storage;
Expand All @@ -28,12 +30,15 @@ public class JetDesignTimeServices : IDesignTimeServices
/// doing so can result in application failures when updating to a new Entity Framework Core release.
/// </summary>
public virtual void ConfigureDesignTimeServices(IServiceCollection serviceCollection)
=> serviceCollection
.AddSingleton<LoggingDefinitions, JetLoggingDefinitions>()
.AddSingleton<IRelationalTypeMappingSource, JetTypeMappingSource>()
.AddSingleton<IDatabaseModelFactory, JetDatabaseModelFactory>()
.AddSingleton<IProviderConfigurationCodeGenerator, JetCodeGenerator>()
.AddSingleton<IAnnotationCodeGenerator, JetAnnotationCodeGenerator>()
.AddSingleton<IJetOptions, JetOptions>();
{
serviceCollection.AddEntityFrameworkJet();
#pragma warning disable EF1001 // Internal EF Core API usage.
new EntityFrameworkRelationalDesignServicesBuilder(serviceCollection)
.TryAdd<IAnnotationCodeGenerator, JetAnnotationCodeGenerator>()
#pragma warning restore EF1001 // Internal EF Core API usage.
.TryAdd<IDatabaseModelFactory, JetDatabaseModelFactory>()
.TryAdd<IProviderConfigurationCodeGenerator, JetCodeGenerator>()
.TryAddCoreServices();
}
}
}
2 changes: 1 addition & 1 deletion src/EFCore.Jet/EFCore.Jet.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<PropertyGroup>
<Description>Jet/ACE database provider for Entity Framework Core (Microsoft Access MDB/ACCDB files).</Description>
<TargetFramework>$(DefaultNetStandardTargetFramework)</TargetFramework>
<TargetFramework>net6.0-windows</TargetFramework>
<RootNamespace>EntityFrameworkCore.Jet</RootNamespace>
<AssemblyName>EntityFrameworkCore.Jet</AssemblyName>
<Platforms>AnyCPU;x86;x64</Platforms>
Expand Down
Loading