Skip to main content
Expression trees · translators · analyzers

Vali-Flow

// one spec. many backends.

Build fluent rules once. Execute in EF Core, SQL, MongoDB, DynamoDB, Elasticsearch, Redis or InMemory.

CoreEF CoreSQLInMemoryMongoDBDynamoDBElasticsearchRedisCoreEF CoreSQLInMemoryMongoDBDynamoDBElasticsearchRedis
8packages
7stores
0 depscore deps
$dotnet add package Vali-Flow

Specs that travel with your data

A single fluent spec becomes LINQ, SQL, NoSQL queries or in-memory checks.

01
🧠

Vali-Flow.Core

Dependency-free fluent builder for expression trees, validation, and reusable specs.

02
🧩

Vali-Flow (EF Core)

Translate specs to LINQ and execute against DbSet<T> with async evaluators.

03
🧪

Vali-Flow.InMemory

Fast in-memory evaluator for unit tests, caching, and local rules.

04
🗄

Vali-Flow.Sql

Generate SQL WHERE clauses for Dapper and raw ADO.NET scenarios.

05
🍃

Vali-Flow.NoSql.MongoDB

Build MongoDB filter definitions directly from specs.

06

Vali-Flow.NoSql.DynamoDB

Translate specs into DynamoDB expressions for fast reads.

07
🔎

Vali-Flow.NoSql.Elasticsearch

Create Elasticsearch queries from a single spec.

08
🧰

Vali-Flow.NoSql.Redis

Generate Redis/RediSearch filters for fast lookup.

spec pipeline

Build → translate → execute

Core builds the expression tree. Evaluators translate it to the store you run.

SpecValiFlow<T>
CoreExpression Tree
TranslatorEF / SQL / NoSQL
EvaluatorWhereAsync / IsValid
StoreEF Core · SQL · Mongo
ResultRows / Matches
🧠Vali-Flow.Core
new ValiFlow<Product>()
spec built
🧩Vali-Flow (EF Core)
WhereAsync(spec)
rows: 42
🗄Vali-Flow.Sql
ToSql(spec)
"WHERE price > @p0"
🧪Vali-Flow.InMemory
IsValid(entity)
valid
🍃Vali-Flow.NoSql.MongoDB
ToFilter(spec)
{ price: { $gt: 10 } }
Vali-Flow.NoSql.DynamoDB
ToExpression(spec)
price > :v0
🔎Vali-Flow.NoSql.Elasticsearch
ToQuery(spec)
{ range: { price: { gt: 10 }}}
🧰Vali-Flow.NoSql.Redis
ToRediSearch(spec)
@price:[10 +inf]
Program.cs
12345678
builder.Services.AddValiFlowEvaluator<Product, AppDbContext>();
// Build a spec
var spec = new ValiFlow<Product>()
.EqualTo(p => p.IsActive, true)
.GreaterThan(p => p.Price, 10m);
var result = await evaluator.WhereAsync(spec);

8 NuGet packages. Install only what you need.

Start with Core, add one evaluator, or mix multiple stores.

EF Core evaluator and main package for relational stores.

dotnet add package Vali-Flow

Core builder for expression-tree specs and validation.

dotnet add package Vali-Flow.Core

In-memory evaluator for tests and local filtering.

dotnet add package Vali-Flow.InMemory

SQL evaluator for Dapper and raw ADO.NET workflows.

dotnet add package Vali-Flow.Sql

MongoDB evaluator using filter definitions.

dotnet add package Vali-Flow.NoSql.MongoDB

DynamoDB evaluator with native expression translation.

dotnet add package Vali-Flow.NoSql.DynamoDB

Elasticsearch evaluator for query DSL output.

dotnet add package Vali-Flow.NoSql.Elasticsearch

Redis evaluator with RediSearch query generation.

dotnet add package Vali-Flow.NoSql.Redis

Where Vali-Flow fits best

Compose rules once, keep behavior consistent across services and storage layers.

REPOS

Repository Filters

Build specs in the application layer and run them inside EF Core or raw SQL repos.

WhereAsync(spec)
MULTI-STORE

Cross-Store Consistency

Use the same spec for MongoDB, DynamoDB, Elasticsearch and Redis search.

ToFilter / ToQuery / ToSql
TESTS

Testing & Validation

Run specs in memory to validate domain rules in fast unit tests.

IsValid(entity)