JGP.Core
1.0.5
See the version list below for details.
dotnet add package JGP.Core --version 1.0.5
NuGet\Install-Package JGP.Core -Version 1.0.5
<PackageReference Include="JGP.Core" Version="1.0.5" />
paket add JGP.Core --version 1.0.5
#r "nuget: JGP.Core, 1.0.5"
// Install JGP.Core as a Cake Addin
#addin nuget:?package=JGP.Core&version=1.0.5
// Install JGP.Core as a Cake Tool
#tool nuget:?package=JGP.Core&version=1.0.5
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 | Versions 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. |
-
net6.0
- Microsoft.AspNetCore.Http (>= 2.2.2)
- Microsoft.AspNetCore.Mvc (>= 2.2.0)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.