pauldeen79.CrossCutting.Data.Core 5.0.3

There is a newer version of this package available.
See the version list below for details.
dotnet add package pauldeen79.CrossCutting.Data.Core --version 5.0.3                
NuGet\Install-Package pauldeen79.CrossCutting.Data.Core -Version 5.0.3                
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="pauldeen79.CrossCutting.Data.Core" Version="5.0.3" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add pauldeen79.CrossCutting.Data.Core --version 5.0.3                
#r "nuget: pauldeen79.CrossCutting.Data.Core, 5.0.3"                
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install pauldeen79.CrossCutting.Data.Core as a Cake Addin
#addin nuget:?package=pauldeen79.CrossCutting.Data.Core&version=5.0.3

// Install pauldeen79.CrossCutting.Data.Core as a Cake Tool
#tool nuget:?package=pauldeen79.CrossCutting.Data.Core&version=5.0.3                

CrossCutting

Generic utilities and other stuff, usable in any layer of any solution. We're targeting .NET Standard 2.0, so you can even use .NET Framework 4.x if you want to.

This repository consists of the following packages:

Package name Description
CrossCutting.Common Provider for system date and user name, some useful extension methods on System.Object and System.String, and the Result class
CrossCutting.Common.Testing Helps you test constructors on null checks
CrossCutting.Data.Abstractions Abstraction for executing database commands using System.Data namespace (IDbConnection and IDbCommand)
CrossCutting.Data.Core Default implementation of database commands
CrossCutting.Data.Sql Extension methods for working with database commands in System.Data namespace (IDbConnection)
CrossCutting.DataTableDumper Produces flat-text data tables from objects
CrossCutting.Utilities.ObjectDumper Produces readable flat-text representation from objects, for use in logging
CrossCutting.Utilities.Parsers Parser for pipe-delmited data table strings, TSQL INSERT INTO statements, function strings, math expressions and formattable strings (dynamic interpolated strings)
System.Data.Stub Stubs for System.Data interfaces like IDbConnection, IDbCommand and IDataReader

Using NSubstitute or Moq as mock factory for CrossCutting.Common.Testing

To use NSubstitute as a mock factory for the code in CrossCutting.Common.Testing, create a test helper project within your solution, and add the following code:

    public static void ShouldThrowArgumentNullExceptionsInConstructorsOnNullArguments(
        this Type type,
        Func<ParameterInfo, bool>? parameterPredicate = null,
        Func<ParameterInfo, object?>? parameterReplaceDelegate = null,
        Func<ConstructorInfo, bool>? constructorPredicate = null)
        => ShouldThrowArgumentNullExceptionsInConstructorsOnNullArguments(
            type,
            t => t.CreateInstance(parameterType => Substitute.For(new[] { parameterType }, Array.Empty<object>()), parameterReplaceDelegate, constructorPredicate),
            parameterPredicate,
            parameterReplaceDelegate,
            constructorPredicate);

You can easily replace NSubstitute with Moq, if you want, by changing the factory delegate argument to this:

t => t.CreateInstance(parameterType => ((Mock)Activator.CreateInstance(typeof(Mock<>).MakeGenericType(parameterType))).Object, parameterReplaceDelegate, constructorPredicate),

Upgrade from 2.x to 3.0

There has been a breaking change in the Result class, which lead to a new major version. To port the old code, you can fix most errors by replace this:

Result<([^>]+)>\.([^(]+)\(

With this:

Result.$2<$1>(
Product Compatible and additional computed target framework versions.
.NET net5.0 was computed.  net5.0-windows was computed.  net6.0 was computed.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 was computed.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed. 
.NET Core netcoreapp2.0 was computed.  netcoreapp2.1 was computed.  netcoreapp2.2 was computed.  netcoreapp3.0 was computed.  netcoreapp3.1 was computed. 
.NET Standard netstandard2.0 is compatible.  netstandard2.1 was computed. 
.NET Framework net461 was computed.  net462 was computed.  net463 was computed.  net47 was computed.  net471 was computed.  net472 was computed.  net48 was computed.  net481 was computed. 
MonoAndroid monoandroid was computed. 
MonoMac monomac was computed. 
MonoTouch monotouch was computed. 
Tizen tizen40 was computed.  tizen60 was computed. 
Xamarin.iOS xamarinios was computed. 
Xamarin.Mac xamarinmac was computed. 
Xamarin.TVOS xamarintvos was computed. 
Xamarin.WatchOS xamarinwatchos was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (3)

Showing the top 3 NuGet packages that depend on pauldeen79.CrossCutting.Data.Core:

Package Downloads
pauldeen79.CrossCutting.Data.Sql

Package Description

pauldeen79.QueryFramework.InMemory

Package Description

pauldeen79.QueryFramework.SqlServer

Package Description

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
5.0.6 121 11/17/2024
5.0.5 209 10/29/2024
5.0.4 220 10/18/2024
5.0.3 259 9/21/2024
5.0.2 254 9/11/2024
5.0.1 472 5/9/2024
5.0.0 302 5/5/2024
4.1.1 335 5/3/2024
4.1.0 282 4/27/2024
4.0.0 325 4/24/2024
3.9.0 269 4/16/2024
3.8.0 171 4/5/2024
3.7.0 414 3/22/2024
3.6.0 159 3/21/2024
3.5.0 291 3/15/2024
3.4.0 301 3/14/2024
3.3.0 748 11/24/2023
3.2.0 313 11/19/2023
3.0.0 200 10/21/2023
2.10.0 442 9/13/2023
2.9.0 224 9/9/2023
2.8.0 207 9/9/2023
2.7.59 205 9/8/2023
2.7.58 196 9/6/2023
2.7.57 237 8/31/2023
2.7.56 211 8/30/2023
2.7.55 491 5/15/2023
2.7.54 219 5/15/2023
2.7.53 740 5/8/2023
2.7.52 245 5/6/2023
2.7.51 231 5/5/2023
2.7.50 234 5/2/2023
2.7.49 225 5/2/2023
2.7.48 220 5/2/2023
2.7.47 242 5/2/2023
2.7.46 226 5/2/2023
2.7.45 244 5/2/2023
2.7.44 228 5/2/2023
2.7.43 231 5/2/2023
2.7.42 252 5/1/2023
2.7.41 268 5/1/2023
2.7.40 290 4/28/2023
2.7.39 250 4/27/2023
2.7.38 246 4/27/2023
2.7.37 294 4/26/2023
2.7.36 299 4/24/2023
2.7.35 360 4/22/2023
2.7.34 317 4/20/2023
2.7.33 307 4/17/2023
2.7.32 319 4/17/2023
2.7.31 299 4/16/2023
2.7.30 384 4/10/2023
2.7.29 307 4/10/2023
2.7.28 297 4/9/2023
2.7.27 307 4/9/2023
2.7.26 300 4/7/2023
2.7.25 670 10/14/2022
2.7.24 680 10/14/2022
2.7.23 675 9/20/2022
2.7.22 666 8/28/2022
2.7.21 652 8/26/2022
2.7.20 670 8/26/2022
2.7.19 706 8/24/2022
2.7.18 1,461 8/15/2022
2.7.17 738 7/1/2022
2.7.16 720 6/30/2022
2.7.15 705 6/29/2022
2.7.14 746 6/29/2022
2.7.13 722 6/26/2022
2.7.12 697 6/24/2022
2.7.11 688 6/24/2022
2.7.10 699 6/17/2022
2.7.9 728 6/16/2022
2.7.8 746 6/8/2022
2.7.7 1,515 5/27/2022
2.7.6 11,838 2/27/2022
2.7.5 1,667 2/24/2022
2.7.4 5,982 1/31/2022
2.7.3 715 12/22/2021
2.7.2 898 12/18/2021
2.7.1 671 12/17/2021
2.7.0 686 12/16/2021
2.6.2 1,333 12/9/2021
2.6.1 606 11/30/2021
2.6.0 566 11/28/2021
2.5.3 580 11/27/2021
2.5.2 2,444 11/26/2021
2.5.0 2,580 11/26/2021
2.4.2 3,471 11/25/2021
2.4.1 2,892 11/25/2021
2.4.0 780 11/23/2021
2.3.0 454 11/22/2021
2.2.5 1,629 11/20/2021
2.2.4 1,079 11/19/2021
2.2.3 602 11/18/2021
2.2.2 659 11/18/2021
2.2.1 453 11/17/2021
2.2.0 560 11/14/2021
2.1.1 543 11/7/2021
2.1.0 619 11/1/2021
2.0.3 529 10/31/2021
2.0.2 409 10/31/2021
2.0.1 398 10/31/2021
2.0.0 396 10/31/2021
1.2.1 450 10/30/2021
1.2.0 386 10/27/2021
1.1.0 652 9/17/2021
1.0.12 403 9/16/2021