diff --git a/samples/TinyHelpers.AspNetCore.Sample/TinyHelpers.AspNetCore.Sample.csproj b/samples/TinyHelpers.AspNetCore.Sample/TinyHelpers.AspNetCore.Sample.csproj index e6de904..bfe9940 100644 --- a/samples/TinyHelpers.AspNetCore.Sample/TinyHelpers.AspNetCore.Sample.csproj +++ b/samples/TinyHelpers.AspNetCore.Sample/TinyHelpers.AspNetCore.Sample.csproj @@ -7,7 +7,7 @@ - + diff --git a/samples/TinyHelpers.Dapper.Sample/TinyHelpers.Dapper.Sample.csproj b/samples/TinyHelpers.Dapper.Sample/TinyHelpers.Dapper.Sample.csproj index 5fa2b81..648def2 100644 --- a/samples/TinyHelpers.Dapper.Sample/TinyHelpers.Dapper.Sample.csproj +++ b/samples/TinyHelpers.Dapper.Sample/TinyHelpers.Dapper.Sample.csproj @@ -7,7 +7,7 @@ - + diff --git a/samples/TinyHelpers.EntityFrameworkCore.Sample/Program.cs b/samples/TinyHelpers.EntityFrameworkCore.Sample/Program.cs index fc55b44..a81d53b 100644 --- a/samples/TinyHelpers.EntityFrameworkCore.Sample/Program.cs +++ b/samples/TinyHelpers.EntityFrameworkCore.Sample/Program.cs @@ -8,13 +8,13 @@ { Title = "TinyHelpers", Content = "A collection of helper methods and classes that I use every day. I have packed them in a single library to avoid code duplication.", - Authors = new string[] { "Marco", "Bot" }, + Authors = ["Marco", "Bot"], Date = DateOnly.FromDateTime(DateTime.UtcNow.AddDays(-1)), - Reviews = new List - { + Reviews = + [ new() { User = "Pippo", Score = 5, Time = TimeOnly.FromDateTime(DateTime.Now) }, new() { User = "Pluto", Score = 4 } - } + ] }; dataContext.Posts.Add(post); diff --git a/samples/TinyHelpers.EntityFrameworkCore.Sample/TinyHelpers.EntityFrameworkCore.Sample.csproj b/samples/TinyHelpers.EntityFrameworkCore.Sample/TinyHelpers.EntityFrameworkCore.Sample.csproj index 8c52332..85b737e 100644 --- a/samples/TinyHelpers.EntityFrameworkCore.Sample/TinyHelpers.EntityFrameworkCore.Sample.csproj +++ b/samples/TinyHelpers.EntityFrameworkCore.Sample/TinyHelpers.EntityFrameworkCore.Sample.csproj @@ -7,7 +7,7 @@ - + diff --git a/src/TinyHelpers.Dapper/TinyHelpers.Dapper.csproj b/src/TinyHelpers.Dapper/TinyHelpers.Dapper.csproj index 69e198d..3e0f93b 100644 --- a/src/TinyHelpers.Dapper/TinyHelpers.Dapper.csproj +++ b/src/TinyHelpers.Dapper/TinyHelpers.Dapper.csproj @@ -21,8 +21,8 @@ - - + + diff --git a/src/TinyHelpers.EntityFrameworkCore/Comparers/DateOnlyComparer.cs b/src/TinyHelpers.EntityFrameworkCore/Comparers/DateOnlyComparer.cs index bad3e23..afe4fb8 100644 --- a/src/TinyHelpers.EntityFrameworkCore/Comparers/DateOnlyComparer.cs +++ b/src/TinyHelpers.EntityFrameworkCore/Comparers/DateOnlyComparer.cs @@ -2,7 +2,6 @@ namespace TinyHelpers.EntityFrameworkCore.Comparers; -#if NET6_0 || NET7_0 public class DateOnlyComparer : ValueComparer { public DateOnlyComparer() : base( @@ -10,5 +9,4 @@ public DateOnlyComparer() : base( d => d.GetHashCode()) { } -} -#endif \ No newline at end of file +} \ No newline at end of file diff --git a/src/TinyHelpers.EntityFrameworkCore/Comparers/TimeOnlyComparer.cs b/src/TinyHelpers.EntityFrameworkCore/Comparers/TimeOnlyComparer.cs index 3e5e55b..8223b77 100644 --- a/src/TinyHelpers.EntityFrameworkCore/Comparers/TimeOnlyComparer.cs +++ b/src/TinyHelpers.EntityFrameworkCore/Comparers/TimeOnlyComparer.cs @@ -2,7 +2,6 @@ namespace TinyHelpers.EntityFrameworkCore.Comparers; -#if NET6_0 || NET7_0 public class TimeOnlyComparer : ValueComparer { public TimeOnlyComparer() : base( @@ -10,5 +9,4 @@ public TimeOnlyComparer() : base( t => t.GetHashCode()) { } -} -#endif +} \ No newline at end of file diff --git a/src/TinyHelpers.EntityFrameworkCore/Converters/DateOnlyConverter.cs b/src/TinyHelpers.EntityFrameworkCore/Converters/DateOnlyConverter.cs index f4298ec..d393757 100644 --- a/src/TinyHelpers.EntityFrameworkCore/Converters/DateOnlyConverter.cs +++ b/src/TinyHelpers.EntityFrameworkCore/Converters/DateOnlyConverter.cs @@ -2,7 +2,6 @@ namespace TinyHelpers.EntityFrameworkCore.Converters; -#if NET6_0 || NET7_0 public class DateOnlyConverter : ValueConverter { public DateOnlyConverter() : base( @@ -10,5 +9,4 @@ public DateOnlyConverter() : base( dateTime => DateOnly.FromDateTime(dateTime)) { } -} -#endif +} \ No newline at end of file diff --git a/src/TinyHelpers.EntityFrameworkCore/Converters/TimeOnlyConverter.cs b/src/TinyHelpers.EntityFrameworkCore/Converters/TimeOnlyConverter.cs index 1387fe6..1fa2530 100644 --- a/src/TinyHelpers.EntityFrameworkCore/Converters/TimeOnlyConverter.cs +++ b/src/TinyHelpers.EntityFrameworkCore/Converters/TimeOnlyConverter.cs @@ -2,7 +2,6 @@ namespace TinyHelpers.EntityFrameworkCore.Converters; -#if NET6_0 || NET7_0 public class TimeOnlyConverter : ValueConverter { public TimeOnlyConverter() : base( @@ -10,5 +9,4 @@ public TimeOnlyConverter() : base( timeSpan => TimeOnly.FromTimeSpan(timeSpan)) { } -} -#endif \ No newline at end of file +} \ No newline at end of file diff --git a/src/TinyHelpers.EntityFrameworkCore/Extensions/PropertyBuilderExtensions.cs b/src/TinyHelpers.EntityFrameworkCore/Extensions/PropertyBuilderExtensions.cs index 06368d5..4e0c1db 100644 --- a/src/TinyHelpers.EntityFrameworkCore/Extensions/PropertyBuilderExtensions.cs +++ b/src/TinyHelpers.EntityFrameworkCore/Extensions/PropertyBuilderExtensions.cs @@ -8,13 +8,11 @@ namespace TinyHelpers.EntityFrameworkCore.Extensions; public static class PropertyBuilderExtensions { -#if NET6_0 || NET7_0 public static PropertyBuilder HasDateOnlyConversion(this PropertyBuilder propertyBuilder) => propertyBuilder.HasConversion(); public static PropertyBuilder HasTimeOnlyConversion(this PropertyBuilder propertyBuilder) => propertyBuilder.HasConversion(); -#endif public static PropertyBuilder HasJsonConversion(this PropertyBuilder propertyBuilder, JsonSerializerOptions? jsonSerializerOptions = null, bool useUtcDate = false, bool serializeEnumAsString = false) { diff --git a/src/TinyHelpers.EntityFrameworkCore/TinyHelpers.EntityFrameworkCore.csproj b/src/TinyHelpers.EntityFrameworkCore/TinyHelpers.EntityFrameworkCore.csproj index 150b807..9b767b4 100644 --- a/src/TinyHelpers.EntityFrameworkCore/TinyHelpers.EntityFrameworkCore.csproj +++ b/src/TinyHelpers.EntityFrameworkCore/TinyHelpers.EntityFrameworkCore.csproj @@ -21,19 +21,19 @@ - + - + - + - + diff --git a/tests/TinyHelpers.Tests/TinyHelpers.Tests.csproj b/tests/TinyHelpers.Tests/TinyHelpers.Tests.csproj index 5417770..61fdb7a 100644 --- a/tests/TinyHelpers.Tests/TinyHelpers.Tests.csproj +++ b/tests/TinyHelpers.Tests/TinyHelpers.Tests.csproj @@ -15,7 +15,7 @@ runtime; build; native; contentfiles; analyzers; buildtransitive all - + runtime; build; native; contentfiles; analyzers; buildtransitive all