Demolite.Core 0.2.0

dotnet add package Demolite.Core --version 0.2.0
                    
NuGet\Install-Package Demolite.Core -Version 0.2.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="Demolite.Core" Version="0.2.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Demolite.Core" Version="0.2.0" />
                    
Directory.Packages.props
<PackageReference Include="Demolite.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 Demolite.Core --version 0.2.0
                    
#r "nuget: Demolite.Core, 0.2.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 Demolite.Core@0.2.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=Demolite.Core&version=0.2.0
                    
Install as a Cake Addin
#tool nuget:?package=Demolite.Core&version=0.2.0
                    
Install as a Cake Tool

Demolite.Core

Shared Result, Result<T> and Error types for the Demolite packages (Demolite.Db, Demolite.Http).

using Demolite.Core.Models;

Result<int> Parse(string s) => int.TryParse(s, out var v)
    ? Result<int>.Success(v)
    : Result<int>.Failure(new Error("Parse.Invalid", $"'{s}' is not a number."));

Use the non-generic Result for operations that return no value.

Result Validate(string s) => s.Length > 0
    ? Result.Success()
    : Result.Failure(new Error("Validate.Empty", "The value is empty."));

Result<T> derives from Result, so IsSuccess and Error are available on both.

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

    • No dependencies.

NuGet packages (2)

Showing the top 2 NuGet packages that depend on Demolite.Core:

Package Downloads
Demolite.Http

A base class for typed api clients on top of HttpClient with Result types, pluggable authentication and dependency injection support.

Demolite.Db

An easy to use abstract EF Core repository built on IDbContextFactory and Result types.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
0.2.0 57 10/11/2026
0.1.0 56 10/11/2026