File tree Expand file tree Collapse file tree 7 files changed +27
-43
lines changed
AutoMapper.AspNetCore.OData.EFCore Expand file tree Collapse file tree 7 files changed +27
-43
lines changed Original file line number Diff line number Diff line change @@ -13,9 +13,7 @@ internal static class Constants
1313 typeof ( DateTimeOffset ) ,
1414 typeof ( DateTime ) ,
1515 typeof ( Date ) ,
16- #if NET6_0 || NET7_0
1716 typeof ( DateOnly )
18- #endif
1917 } ;
2018
2119 public static HashSet < Type > DateTimeRelatedTypes = new ( )
@@ -24,10 +22,8 @@ internal static class Constants
2422 typeof ( DateTime ) ,
2523 typeof ( TimeSpan ) ,
2624 typeof ( TimeOfDay ) ,
27- #if NET6_0 || NET7_0
2825 typeof ( TimeOnly ) ,
2926 typeof ( DateOnly ) ,
30- #endif
3127 typeof ( Date )
3228 } ;
3329
Original file line number Diff line number Diff line change @@ -715,16 +715,12 @@ private bool ShouldConvertToNumericDate(BinaryOperatorNode binaryOperatorNode)
715715
716716 static bool ShouldConvert ( Type leftType , Type rightType )
717717 => BothTypesDateRelated ( leftType , rightType )
718- #if NET6_0 || NET7_0
719718 && (
720719 leftType == typeof ( Date )
721720 || rightType == typeof ( Date )
722721 || leftType == typeof ( DateOnly )
723722 || rightType == typeof ( DateOnly )
724723 ) ;
725- #else
726- & & ( leftType == typeof ( Date ) || rightType == typeof ( Date ) ) ;
727- #endif
728724 }
729725
730726 private bool ShouldConvertToNumericTime ( BinaryOperatorNode binaryOperatorNode )
@@ -740,16 +736,12 @@ private bool ShouldConvertToNumericTime(BinaryOperatorNode binaryOperatorNode)
740736
741737 static bool ShouldConvert ( Type leftType , Type rightType )
742738 => BothTypesDateTimeRelated ( leftType , rightType )
743- #if NET6_0 || NET7_0
744739 && (
745740 leftType == typeof ( TimeOfDay )
746741 || rightType == typeof ( TimeOfDay )
747742 || leftType == typeof ( TimeOnly )
748743 || rightType == typeof ( TimeOnly )
749744 ) ;
750- #else
751- & & ( leftType == typeof ( TimeOfDay ) || rightType == typeof ( TimeOfDay ) ) ;
752- #endif
753745 }
754746
755747 public IExpressionPart GetConstantOperandFilterPart ( ConstantNode constantNode )
Original file line number Diff line number Diff line change 11<Project Sdk =" Microsoft.NET.Sdk" >
22
33 <PropertyGroup >
4- <TargetFrameworks >netcoreapp3.1;net5.0;net6 .0</TargetFrameworks >
4+ <TargetFrameworks >net6.0;net7 .0</TargetFrameworks >
55 </PropertyGroup >
66
7- <ItemGroup Condition =" '$(TargetFramework)' == 'netcoreapp3.1' " >
8- <PackageReference Include =" Microsoft.EntityFrameworkCore" Version =" 3.1.0" />
9- </ItemGroup >
10-
11- <ItemGroup Condition =" '$(TargetFramework)' == 'net5.0' " >
12- <PackageReference Include =" Microsoft.EntityFrameworkCore" Version =" 5.0.0" />
13- </ItemGroup >
14-
157 <ItemGroup Condition =" '$(TargetFramework)' == 'net6.0' " >
168 <PackageReference Include =" Microsoft.EntityFrameworkCore" Version =" 6.0.0" />
179 </ItemGroup >
1810
11+ <ItemGroup Condition =" '$(TargetFramework)' == 'net7.0' " >
12+ <PackageReference Include =" Microsoft.EntityFrameworkCore" Version =" 7.0.0" />
13+ </ItemGroup >
14+
1915</Project >
Original file line number Diff line number Diff line change 11<Project Sdk =" Microsoft.NET.Sdk" >
22
3- <PropertyGroup >
4- <OutputType >Exe</OutputType >
5- <TargetFramework >netcoreapp3.1 </TargetFramework >
6- </PropertyGroup >
3+ <PropertyGroup >
4+ <OutputType >Exe</OutputType >
5+ <TargetFramework >net7.0 </TargetFramework >
6+ </PropertyGroup >
77
8- <ItemGroup >
9- <PackageReference Include =" Microsoft.EntityFrameworkCore.Design" Version =" 3.1 .0" >
10- <PrivateAssets >all</PrivateAssets >
11- <IncludeAssets >runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets >
12- </PackageReference >
13- <PackageReference Include =" Microsoft.EntityFrameworkCore.SqlServer" Version =" 3.1 .0" />
14- </ItemGroup >
8+ <ItemGroup >
9+ <PackageReference Include =" Microsoft.EntityFrameworkCore.Design" Version =" 7.0 .0" >
10+ <PrivateAssets >all</PrivateAssets >
11+ <IncludeAssets >runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets >
12+ </PackageReference >
13+ <PackageReference Include =" Microsoft.EntityFrameworkCore.SqlServer" Version =" 7.0 .0" />
14+ </ItemGroup >
1515
1616 <ItemGroup >
1717 <ProjectReference Include =" ..\DAL.EFCore\DAL.EFCore.csproj" />
Original file line number Diff line number Diff line change 33
44namespace MigrationTool . Migrations
55{
6- public partial class initial : Migration
6+ public partial class Initial : Migration
77 {
88 protected override void Up ( MigrationBuilder migrationBuilder )
99 {
Original file line number Diff line number Diff line change 11<Project Sdk =" Microsoft.NET.Sdk" >
22
3- <PropertyGroup >
4- <OutputType >Exe</OutputType >
5- <TargetFramework >netcoreapp3.1 </TargetFramework >
6- </PropertyGroup >
3+ <PropertyGroup >
4+ <OutputType >Exe</OutputType >
5+ <TargetFramework >net7.0 </TargetFramework >
6+ </PropertyGroup >
77
8- <ItemGroup >
9- <PackageReference Include =" Microsoft.EntityFrameworkCore.SqlServer" Version =" 3.1 .0" />
10- <PackageReference Include =" Microsoft.Extensions.Configuration.FileExtensions" Version =" 3.1 .0" />
11- <PackageReference Include =" Microsoft.Extensions.Configuration.Json" Version =" 3.1 .0" />
12- </ItemGroup >
8+ <ItemGroup >
9+ <PackageReference Include =" Microsoft.EntityFrameworkCore.SqlServer" Version =" 7.0 .0" />
10+ <PackageReference Include =" Microsoft.Extensions.Configuration.FileExtensions" Version =" 7.0 .0" />
11+ <PackageReference Include =" Microsoft.Extensions.Configuration.Json" Version =" 7.0 .0" />
12+ </ItemGroup >
1313
1414 <ItemGroup >
1515 <ProjectReference Include =" ..\DAL.EFCore\DAL.EFCore.csproj" />
You can’t perform that action at this time.
0 commit comments