Skip to content

Commit b7a05b5

Browse files
committed
v0.7.0
1 parent 4783f2d commit b7a05b5

6 files changed

Lines changed: 13 additions & 17 deletions

File tree

LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
MIT License
22

3-
Copyright (c) 2024-2025 IvanGit
3+
Copyright (c) 2024-2026 IvanGit
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy
66
of this software and associated documentation files (the "Software"), to deal

src/NuExt.System.Data.csproj

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22

33
<PropertyGroup>
4-
<TargetFrameworks>netstandard2.1;netstandard2.0;net10.0;net9.0;net8.0;net462</TargetFrameworks>
4+
<TargetFrameworks>netstandard2.1;netstandard2.0;net10.0;net9.0;net8.0;net471;net462</TargetFrameworks>
55
<Nullable>enable</Nullable>
66
<ImplicitUsings>enable</ImplicitUsings>
7-
<TreatWarningsAsErrors Condition="'$(Configuration)' == 'Release'">true</TreatWarningsAsErrors>
87
<GeneratePackageOnBuild Condition="'$(Configuration)' == 'Release'">true</GeneratePackageOnBuild>
98
<PackageTags>nuext;extensions;database;ado.net;async</PackageTags>
109
<Description>Provides various extensions for data classes.
@@ -17,7 +16,7 @@ System.Data.DataTableExtensions
1716
System.Data.DalBase
1817
System.Data.DbConverter&lt;TDbConnection&gt;
1918
System.Data.IDbContext</Description>
20-
<Version>0.6.0</Version>
19+
<Version>0.7.0</Version>
2120
<RootNamespace />
2221
<GenerateDocumentationFile>True</GenerateDocumentationFile>
2322
<NoWarn>$(NoWarn);1591;NETSDK1233</NoWarn>
@@ -26,12 +25,8 @@ System.Data.IDbContext</Description>
2625
<PackageProjectUrl>https://github.com/IvanGit/NuExt.System.Data</PackageProjectUrl>
2726
</PropertyGroup>
2827

29-
<PropertyGroup Condition="'$(TargetFramework)' == 'netstandard2.0' or '$(TargetFramework)' == 'net462'">
30-
<DefineConstants>$(DefineConstants);NET_OLD</DefineConstants>
31-
</PropertyGroup>
32-
3328
<ItemGroup Condition="'$(UseNuExtPackages)' == 'true'">
34-
<PackageReference Include="NuExt.System" Version="0.6.0" />
29+
<PackageReference Include="NuExt.System" Version="0.7.0" />
3530
</ItemGroup>
3631

3732
<ItemGroup Condition="'$(UseNuExtPackages)' == 'false'">

src/System/Data/DalBase.cs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
using System.Diagnostics.CodeAnalysis;
1+
using System.ComponentModel;
2+
using System.Diagnostics.CodeAnalysis;
23

34
namespace System.Data
45
{
@@ -41,7 +42,7 @@ protected DalBase()
4142
/// Attempts to create and assign a new instance of the database context if it is not already initialized.
4243
/// </summary>
4344
/// <param name="context">Reference to the database context.</param>
44-
/// <returns><c>true</c> if a new context was created; otherwise, <c>false</c>.</returns>
45+
/// <returns><see langword="true"/> if a new context was created; otherwise, <see langword="false"/>.</returns>
4546
protected bool TryCreateDbContext([NotNull] ref TDbContext? context)
4647
{
4748
if (context != null) return false;

src/System/Data/DataReaderExtensions.FwStd20.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#if NET_OLD
1+
#if !(NET5_0_OR_GREATER || NETSTANDARD2_1_OR_GREATER)
22
using System.ComponentModel;
33
using System.Data.Common;
44

src/System/Data/DbConverter.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ public abstract class DbConverter<TDbConnection> where TDbConnection : IDbConnec
3232
/// </summary>
3333
/// <param name="connection">The database connection to check.</param>
3434
/// <param name="cancellationToken">Cancellation token to cancel the execution.</param>
35-
/// <returns><c>true</c> if the database requires an update; otherwise, <c>false</c>.</returns>
35+
/// <returns><see langword="true"/> if the database requires an update; otherwise, <see langword="false"/>.</returns>
3636
public virtual bool RequiresUpdate(TDbConnection connection, CancellationToken cancellationToken)
3737
{
3838
Version dbVersion = GetDbVersion(connection, cancellationToken);
@@ -44,7 +44,7 @@ public virtual bool RequiresUpdate(TDbConnection connection, CancellationToken c
4444
/// </summary>
4545
/// <param name="connection">The database connection to update.</param>
4646
/// <param name="cancellationToken">Cancellation token to cancel the execution.</param>
47-
/// <returns><c>true</c> if the update was successful; otherwise, <c>false</c>.</returns>
47+
/// <returns><see langword="true"/> if the update was successful; otherwise, <see langword="false"/>.</returns>
4848
public abstract bool Update(TDbConnection connection, CancellationToken cancellationToken);
4949

5050
#endregion

src/System/Data/DbConverterExtensions.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ public static void Initialize<TDbConnection>(this IReadOnlyList<DbConverter<TDbC
3838
try
3939
{
4040

41-
#if NET_OLD
41+
#if NETFRAMEWORK || NETSTANDARD2_0
4242
var dbVersion = converters[converters.Count - 1].Version;
4343
#else
4444
var dbVersion = converters[^1].Version;
@@ -48,7 +48,7 @@ public static void Initialize<TDbConnection>(this IReadOnlyList<DbConverter<TDbC
4848
bool result = converters.Update(connection, dbVersion, cancellationToken);
4949
Debug.Assert(result);
5050
}
51-
#if NET_OLD
51+
#if NETFRAMEWORK || NETSTANDARD2_0
5252
CheckDbVersion(connection, converters[converters.Count - 1].GetDbVersion, dbVersion, cancellationToken);
5353
#else
5454
CheckDbVersion(connection, converters[^1].GetDbVersion, dbVersion, cancellationToken);
@@ -81,7 +81,7 @@ private static bool RequiresUpdate<TDbConnection>(this IReadOnlyList<DbConverter
8181

8282
Debug.Assert(connection is { State: ConnectionState.Open }, $"{nameof(connection)} is not opened.");
8383
if (
84-
#if NET_OLD
84+
#if NETFRAMEWORK || NETSTANDARD2_0
8585
converters[converters.Count - 1]
8686
#else
8787
converters[^1]

0 commit comments

Comments
 (0)