JGP.Core 1.0.6

dotnet add package JGP.Core --version 1.0.6
NuGet\Install-Package JGP.Core -Version 1.0.6
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="JGP.Core" Version="1.0.6" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add JGP.Core --version 1.0.6
#r "nuget: JGP.Core, 1.0.6"
#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 JGP.Core as a Cake Addin
#addin nuget:?package=JGP.Core&version=1.0.6

// Install JGP.Core as a Cake Tool
#tool nuget:?package=JGP.Core&version=1.0.6

JGP.Core

Provide receipts for your service actions.

Executed some CRUD against the database? ActionReceipt. Execution succeeded? ActionReceipt. Execution failed? ActionReceipt.

Example usage:

    public async Task<ActionReceipt> PerformSomeCRUD(SomeClass someClass)
    {
    	try
    	{
    		var target = await FindSomethingAsync(someClass.SomeProperty);
    		if (target == null)
    		{
    			return ActionReceipt.GetNotFoundReceipt("Couldn't find target.'");
    		}
    
    		target.Update(someClass);
    		var affectedTotal = await SaveSomethingAsync();
    		return ActionReceipt.GetSuccessReceipt(affectedTotal);
    	}
    	catch (Exception ex)
    	{
    		_logger.LogError(ex, ...);
    		return ActionReceipt.GetErrorReceipt(ex);
    	}
    }

Now with handy-dandy ModelStateDictionary support!

Add errors to your ModelStateDictionary and show your users how they messed up. Or.. If you're not a RockStar 10x dev (despite your sweet triple monitor setup and mechanical keyboard) - make debugging issues a little easier.

    ModelState.AddModelValidationErrors(actionReceipt);
Product Compatible and additional computed target framework versions.
.NET net6.0 is compatible.  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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
1.0.6 450 8/28/2022
1.0.5 377 8/28/2022
1.0.4 395 8/27/2022
1.0.3 410 7/31/2022
1.0.2 377 7/30/2022
1.0.1 477 7/30/2022
1.0.0 614 7/27/2022