PostgreSQL's range, multirange and array types as first-class .NET values: ranges and value sets with their full algebra in memory, and the same code as SQL via EF Core. BCL and NodaTime.
https://caffeinatedcoder.github.io/CodoMetis.ValueRanges/ โ// momentum
// why it's here
- Active: last commit today
- Built almost entirely by one person
- Health 94/100 with only 6 stars
- 60 open issues handled by one or two people
// how to help
// readme
CodoMetis.ValueRanges
Immutable range types ([2025-06-01, 2025-06-08]) and value sets ({alpha, beta}) for
.NET. You get the complete interval and membership algebra in your own process, with no ORM and no
database driver. An EF Core package runs the same calls as SQL against native PostgreSQL range,
multirange and array columns, so one expression means the same thing in a unit test and in SQL.
Install
dotnet add package CodoMetis.ValueRanges
Version 11 needs .NET 11, and version 10 needs .NET 10. Until 11.0.0 is released, dotnet add package
installs 10.x, and the 11 previews need --prerelease. To run your LINQ queries as SQL, add the EF Core package,
CodoMetis.ValueRanges.EFCore.PostgreSQL. It needs PostgreSQL 16 or later. For NodaTime types, add the
NodaTime packages.
Good to know: