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
                    
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="Maris.Core" Version="2.1.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Maris.Core" Version="2.1.0" />
                    
Directory.Packages.props
<PackageReference Include="Maris.Core" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Maris.Core --version 2.1.0
                    
#r "nuget: Maris.Core, 2.1.0"
                    
#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.
#:package Maris.Core@2.1.0
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Maris.Core&version=2.1.0
                    
Install as a Cake Addin
#tool nuget:?package=Maris.Core&version=2.1.0
                    
Install as a Cake Tool

Maris.Core

Apache License v2 Maris.Core Release date

日本語版

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

Apache License Version 2.0

Product 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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
  • .NETFramework 4.7.2

  • 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