GenericServices.StatusGeneric
1.1.0
A support library to provide a common status handling for my projects.
Install-Package GenericServices.StatusGeneric -Version 1.1.0
dotnet add package GenericServices.StatusGeneric --version 1.1.0
<PackageReference Include="GenericServices.StatusGeneric" Version="1.1.0" />
paket add GenericServices.StatusGeneric --version 1.1.0
#r "nuget: GenericServices.StatusGeneric, 1.1.0"
GenericServices.StatusGeneric
This provides a way to return the status of a method/class that you run. It contains two main things
- A IReadOnlyList of
Errors
, which may be empty. If the list is empty, then theIsValid
property of the status will be true. - A
Message
which can be set by you (default value is "Success"), but if it has any errors theMessage
returns "Failed with nn errors". - The
IStatusGeneric<T>
version will return aResult
which you can set, but returnsdefault(T)
if there are errors.
There are various methods to add errors to the Errors
list, and a way to combine statuses.
GenericServices.StatusGeneric
This provides a way to return the status of a method/class that you run. It contains two main things
- A IReadOnlyList of
Errors
, which may be empty. If the list is empty, then theIsValid
property of the status will be true. - A
Message
which can be set by you (default value is "Success"), but if it has any errors theMessage
returns "Failed with nn errors". - The
IStatusGeneric<T>
version will return aResult
which you can set, but returnsdefault(T)
if there are errors.
There are various methods to add errors to the Errors
list, and a way to combine statuses.
Release Notes
- Updated to provide needed features for GenericBizRunner
- Added some interfaces and made Message read/write
Dependencies
-
.NETStandard 2.0
- System.ComponentModel.Annotations (>= 4.6.0)
Used By
NuGet packages (7)
Showing the top 5 NuGet packages that depend on GenericServices.StatusGeneric:
Package | Downloads |
---|---|
EfCore.GenericServices
Library to help you quickly code Create, Read, Update and Delete (CRUD) accesses in web/mobile/desktop applications using Entity Framework Core.
|
|
EfCore.GenericBizRunner
Library to run business logic when using Entity Framework Core for database accesses
|
|
EfCore.GenericServices.AspNetCore
A support library to the EfCore.GenericServices and EfCore.GenericBizRunner libraries. It converts IStatusGeneric into ASP.NET Core's ModelState or Web API response
|
|
EfCore.GenericEventRunner
A library to provide domain event handling to EF Core.
|
|
EfCore.SoftDeleteServices
Services to provide simple soft delete and cascade soft delete in EF Core.
|
GitHub repositories (3)
Showing the top 3 popular GitHub repositories that depend on GenericServices.StatusGeneric:
Repository | Stars |
---|---|
JonPSmith/EfCore.GenericServices
A library to help you quickly code CRUD accesses for a web/mobile/desktop application using EF Core.
|
|
JonPSmith/EfCore.TestSupport
Tools for helping in unit testing applications that use Entity Framework Core
|
|
JonPSmith/EfCore.GenericBizRunner
Library to run business logic when using Entity Framework Core for database accesses
|