MESK.ResponseEntity
1.0.2
See the version list below for details.
dotnet add package MESK.ResponseEntity --version 1.0.2
NuGet\Install-Package MESK.ResponseEntity -Version 1.0.2
<PackageReference Include="MESK.ResponseEntity" Version="1.0.2" />
<PackageVersion Include="MESK.ResponseEntity" Version="1.0.2" />
<PackageReference Include="MESK.ResponseEntity" />
paket add MESK.ResponseEntity --version 1.0.2
#r "nuget: MESK.ResponseEntity, 1.0.2"
#:package MESK.ResponseEntity@1.0.2
#addin nuget:?package=MESK.ResponseEntity&version=1.0.2
#tool nuget:?package=MESK.ResponseEntity&version=1.0.2
MESK.ResponseEntity
MESK.ResponseEntity is a lightweight and generic response wrapper for .NET projects.
It provides a standardized way to return API responses with success/failure states, messages, validation errors, status codes, and optional data payloads.
🚀 Features
- ✅ Generic type support → return any type as response
Data
. - ✅ Factory methods →
Success
,Failure
,ValidationError
. - ✅ Fluent API → e.g.
.WithValidationErrors(...)
,.WithMessage(...)
. - ✅ HttpStatusCode integration for consistent responses.
- ✅ System.Text.Json support →
[JsonConstructor]
andToString()
override. - ✅ Easy to unit test and integrate with Web APIs.
📦 Installation
Add via NuGet:
dotnet add package MESK.ResponseEntity
📖 Usage
Success Response
var result = ResponseEntity<string>.Succeeded()
.WithData("Hello World!")
.WithMessage("Testing from MESK.ResponseEntity!");
Failure Response
var result = ResponseEntity<string>.Failure()
.WithValidationErrors(validationErrors);
Contributing
Contributions are welcome! Please open issues or submit pull requests for bug fixes, new features, or improvements. Make sure to follow the existing code style and include relevant tests.
License
This project is licensed under the MIT License. See the LICENSE file for details.
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net9.0 is compatible. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 was computed. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
-
net9.0
- No dependencies.
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.