qowaiv.org redesign - mockQowaiv/Qowaiv#766 · static mock, links between screens only
qowaiv.org/

Domain-driven design, bottom up

Qowaiv is a library of Single Value Objects for .NET. IBANs, email addresses, money, postal codes and dozens more, as small immutable structs, so your model stops passing strings and decimals around.

>dotnet add package Qowaiv
C#
var iban = InternationalBankAccountNumber.Parse("nl20ingb0001234567");

iban.Country;          // Country.NL
iban.ToString("F");    // NL20 INGB 0001 2345 67
iban.ToString("O");    // NL20XXXXXXXXXXX567

var email = EmailAddress.Parse("Info@Qowaiv.org");

email.ToString();      // info@qowaiv.org

What every value object gives you

The same behaviour on every type, so learning one teaches you all of them.

✓

Parse and validate

Parse, TryParse and IsValid. Invalid input never gets into your model.

Aa

Format

Custom format strings, ICustomFormatter support and labels in 14 languages.

{ }

Serialize

System.Text.Json, Newtonsoft, XML, MongoDB BSON and SQL parameters.

∅

Never null

Every type is a struct with a meaningful default, such as Empty or Zero.

Packages

Start with Qowaiv; add the others when you need them.

PackageWhat it is for
QowaivThe value objects themselves: dates, finance, email, postal codes, IDs and more.Docs · NuGet
Qowaiv.Validation.*Result<T> and IValidator<T>, with DataAnnotations, FluentValidation, guarding and XSD.Docs · NuGet
Qowaiv.DomainModelBuilding blocks for a domain-driven, event-sourced application.Docs · NuGet
SerializationConverters for Newtonsoft, MongoDB BSON, and System.Text.Json on frameworks before .NET 10.Docs · NuGet
Qowaiv.Data.SqlClientValue objects as SQL parameters.Docs · NuGet
Qowaiv.TestToolsHelpers for testing your own value objects and models.Docs · NuGet
Qowaiv.Analyzers.CSharpRoslyn analyzers, rules QW0001 to QW0030.Rules · NuGet
Qowaiv.Locale.NLDutch value objects: BSN, KvK number, BAG ID, RSIN and more.Docs · NuGet

Value objects

Grouped as in today's README; every chip is a page.

General
Financial
Globalization
Identifiers
Security
Other
Locale NL
.NET extensions