Maris.Core
2.1.0
Prefix Reserved
dotnet add package Maris.Core --version 2.1.0
NuGet\Install-Package Maris.Core -Version 2.1.0
<PackageReference Include="Maris.Core" Version="2.1.0" />
<PackageVersion Include="Maris.Core" Version="2.1.0" />
<PackageReference Include="Maris.Core" />
paket add Maris.Core --version 2.1.0
#r "nuget: Maris.Core, 2.1.0"
#:package Maris.Core@2.1.0
#addin nuget:?package=Maris.Core&version=2.1.0
#tool nuget:?package=Maris.Core&version=2.1.0
Maris.Core
Provides core libraries for .NET business application development.
Install
Run the following command in Package Manager Console or Command Prompt to install Maris.Core.
- Package Manager Console
Install-Package Maris.Core
- Command Prompt
dotnet add package Maris.Core
Usage
Handling Business Errors
You can handle errors that occur in business logic in a structured way.
Define error information with the BusinessError class and throw it using the BusinessException exception class.
using Maris.Core;
// Create error messages
var errorMessage1 = new ErrorMessage("Product code {0} does not exist.", "P001");
var errorMessage2 = new ErrorMessage("Insufficient stock.");
// Create business error
var businessError = new BusinessError("ERR001", errorMessage1, errorMessage2);
// Throw business exception
throw new BusinessException(businessError);
You can also handle multiple business errors together.
using Maris.Core;
// Create multiple business errors
var error1 = new BusinessError("ERR001", new ErrorMessage("Input error."));
var error2 = new BusinessError("ERR002", new ErrorMessage("Validation error."));
// Throw multiple errors together
var exception = new BusinessException(error1, error2);
throw exception;
// Retrieve error information
foreach (var error in exception.GetErrors())
{
Console.WriteLine($"{error.ExceptionId}: {error.ErrorMessage}");
}
Dependencies
System.Text.Json (.NET Framework 4.7.2 only)
A package that provides JSON serialization and deserialization.
License
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net8.0 is compatible. 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. 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 is compatible. 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. |
| .NET Framework | net472 is compatible. net48 was computed. net481 was computed. |
-
.NETFramework 4.7.2
- System.Text.Json (>= 9.0.1)
-
net10.0
- No dependencies.
-
net8.0
- No dependencies.
-
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.
| Version | Downloads | Last Updated |
|---|---|---|
| 2.1.0 | 546 | 12/22/2025 |
| 2.1.0-Beta3 | 238 | 12/19/2025 |